Skip to content

Commit

Permalink
- Clear caches before sending group user added/removed events
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Aug 20, 2020
1 parent e2b89f1 commit b5d2b8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -4,6 +4,10 @@ Change Log
2.5 (unreleased)
----------------

- Clear caches before sending group user added/removed events
(`#71
<https://github.com/zopefoundation/Products.PluggableAuthService/issues/71>`_)

- Prevent creation of users/groups/roles with empty ID in the ZODB
(`#70
<https://github.com/zopefoundation/Products.PluggableAuthService/issues/70>`_)
Expand Down
4 changes: 2 additions & 2 deletions Products/PluggableAuthService/plugins/ZODBGroupManager.py
Expand Up @@ -274,8 +274,8 @@ def addPrincipalToGroup(self, principal_id, group_id):
if not already:
new = current + (group_id,)
self._principal_groups[principal_id] = new
notify(PrincipalAddedToGroup(principal_id, group_id))
self._invalidatePrincipalCache(principal_id)
notify(PrincipalAddedToGroup(principal_id, group_id))

return not already

Expand All @@ -301,8 +301,8 @@ def removePrincipalFromGroup(self, principal_id, group_id):

if already:
self._principal_groups[principal_id] = new
notify(PrincipalRemovedFromGroup(principal_id, group_id))
self._invalidatePrincipalCache(principal_id)
notify(PrincipalRemovedFromGroup(principal_id, group_id))

return already

Expand Down

0 comments on commit b5d2b8f

Please sign in to comment.