Commit a1b159a5 authored by Vincent Pelletier's avatar Vincent Pelletier

Handle the case where no role is found.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15441 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dffe25c6
...@@ -474,8 +474,11 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -474,8 +474,11 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
raise DeprecationWarning, "The usage of allowedRolesAndUsers is "\ raise DeprecationWarning, "The usage of allowedRolesAndUsers is "\
"deprecated. Please update your catalog "\ "deprecated. Please update your catalog "\
"business template." "business template."
allowedRolesAndUsers = ["'%s'" % (role, ) for role in allowedRolesAndUsers] if allowedRolesAndUsers:
security_uid_list = [x.uid for x in method(security_roles_list = allowedRolesAndUsers)] allowedRolesAndUsers = ["'%s'" % (role, ) for role in allowedRolesAndUsers]
security_uid_list = [x.uid for x in method(security_roles_list = allowedRolesAndUsers)]
else:
security_uid_list = []
return security_uid_list, role_column_dict return security_uid_list, role_column_dict
security.declarePublic( 'getSecurityQuery' ) security.declarePublic( 'getSecurityQuery' )
......
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