Re: [Zope-dev] helper script for permission renames ?

2003-09-14 Thread Dieter Maurer
Simon Michael wrote at 2003-9-13 13:20 -0700:
 > Upgrading a product whose permissions have been renamed can be a pain.. 
 > you lose your permissions settings and have to recreate them.
 > 
 > Has anyone seen a script that would walk the zodb and replicate the old 
 > permission settings under the new name ?

I did not but such a script would be quite easy.

The permission mapping is maintained in an attribute.
The name of this attribute is derived from the permission
by replacing all non letters/digits by '_', by prefixing with
"_" and suffixing with "_Permission".
You find the details in "AccessControl/PermissionRole.py".


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] helper script for permission renames ?

2003-09-13 Thread Simon Michael
Upgrading a product whose permissions have been renamed can be a pain.. 
you lose your permissions settings and have to recreate them.

Has anyone seen a script that would walk the zodb and replicate the old 
permission settings under the new name ?

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )