[Zope-dev] helper script for permission renames ?

Dieter Maurer dieter at handshake.de
Sun Sep 14 17:04:42 EDT 2003


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



More information about the Zope-Dev mailing list