Commit 3887bb9b authored by Vincent Pelletier's avatar Vincent Pelletier

Add a getter for security uid cache.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24410 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f33a6a7f
......@@ -721,6 +721,17 @@ class Catalog(Folder,
self.security_uid_dict[allowed_roles_and_users] = security_uid
return (security_uid, allowed_roles_and_users)
def getRoleAndSecurityUidList(self):
"""
Return a list of 2-tuples, suitable for direct use in a zsqlmethod.
Goal: make it possible to regenerate a table containing this data.
"""
result = []
extend = result.extend
for role_list, security_uid in getattr(aq_base(self), 'security_uid_dict', {}).iteritems():
extend([(role, security_uid) for role in role_list])
return result
def clear(self):
"""
Clears the catalog by calling a list of methods
......
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