Commit d2c48e7c authored by Sebastien Robin's avatar Sebastien Robin

make getAllowedRolesandusers working with groups


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3388 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c25d1487
......@@ -266,7 +266,8 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
when you list up documents.
"""
user = _getAuthenticatedUser(self)
allowedRolesAndUsers = self._listAllowedRolesAndUsers( user )
user_and_group_list = self._listAllowedRolesAndUsers(user)
allowedRolesAndUsers = []
# Patch for ERP5 by JP Smets in order
# to implement worklists and search of local roles
......@@ -278,9 +279,9 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
if type(local_roles) == type('a'):
local_roles = local_roles.split(';')
# Local roles now has precedence (since it comes from a WorkList)
allowedRolesAndUsers = []
for user_or_group in user_and_group_list:
for role in local_roles:
allowedRolesAndUsers.append('user:%s:%s' % (user, role))
allowedRolesAndUsers.append('%s:%s' % (user_or_group, role))
return allowedRolesAndUsers
......
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