Skip to content

Commit

Permalink
Updated GroupAwareRoleManager__getRolesForPrincipal_cachekey with req…
Browse files Browse the repository at this point in the history
…uest params
  • Loading branch information
sgeulette committed Jul 15, 2022
1 parent 134ddf4 commit 6a5a5bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/imio/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def GroupsTool__getGroupsForPrincipal_cachekey(method, self, principal):

def GroupAwareRoleManager__getRolesForPrincipal_cachekey(method, self, principal, request=None):
req = request or getRequest()
if req is None:
raise pmram.DontCache
# if req is None:
# raise pmram.DontCache
date = get_cachekey_volatile('_users_groups_value')
return date, principal and principal.getId(), repr(req)
return (date, principal and principal.getId(), repr(req), req and (req.get('__ignore_direct_roles__', False),
req.get('__ignore_group_roles__', False)) or (None, None))


def PluggableAuthService__getGroupsForPrincipal_cachekey(method, self, principal, request=None, **kwargs):
Expand Down

0 comments on commit 6a5a5bb

Please sign in to comment.