Commit 67683b19 authored by Jim Fulton's avatar Jim Fulton

Changed the method, possible_permissions, used for permission mapping

to include inherited permissions as well as registered permissions.
parent 81e3cd18
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Access control support""" """Access control support"""
__version__='$Revision: 1.35 $'[11:-2] __version__='$Revision: 1.36 $'[11:-2]
from Globals import HTMLFile, MessageDialog, Dictionary from Globals import HTMLFile, MessageDialog, Dictionary
...@@ -502,13 +502,19 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager): ...@@ -502,13 +502,19 @@ class RoleManager(ExtensionClass.Base, PermissionMapping.RoleManager):
pass pass
def possible_permissions(self): def possible_permissions(self):
r=map( d={}
lambda p: p[0], for p in Products.__ac_permissions__:
Products.__ac_permissions__+ d[p[0]]=1
self.aq_acquire('_getProductRegistryData')('ac_permissions') for p in self.aq_acquire('_getProductRegistryData')('ac_permissions'):
) d[p[0]]=1
r.sort()
return r for p in self.ac_inherited_permissions(1):
d[p[0]]=1
d=d.keys()
d.sort()
return d
Globals.default__class_init__(RoleManager) Globals.default__class_init__(RoleManager)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment