Commit d6d6e8a1 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Cédric Le Ninivin

Treat user with Manager role as superuser.

parent 9d9f70b9
......@@ -456,7 +456,8 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
"""
user = _getAuthenticatedUser(self)
user_str = str(user)
user_is_superuser = (user == system_user) or (user_str == SUPER_USER)
user_is_superuser = (user == system_user) or (user_str == SUPER_USER) or \
('Manager' in user.getRoles())
allowedRolesAndUsers = self._listAllowedRolesAndUsers(user)
role_column_dict = {}
local_role_column_dict = {}
......@@ -582,7 +583,8 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
"""
user = _getAuthenticatedUser(self)
user_str = str(user)
user_is_superuser = (user == system_user) or (user_str == SUPER_USER)
user_is_superuser = (user == system_user) or (user_str == SUPER_USER) or \
('Manager' in user.getRoles())
if user_is_superuser:
# We need no security check for super user.
return query
......
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