Commit 623c2a34 authored by Sebastien Robin's avatar Sebastien Robin

- allows to give parameters to isMemberOf

- when update role mapping, reindex security with a low priority
  in order to not make a site unusable


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23565 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 290c73df
......@@ -2326,11 +2326,11 @@ class Base( CopyContainer,
# Category testing
security.declareProtected( Permissions.View, 'isMemberOf' )
def isMemberOf(self, category):
def isMemberOf(self, category, **kw):
"""
Tests if an object if member of a given category
"""
return self._getCategoryTool().isMemberOf(self, category)
return self._getCategoryTool().isMemberOf(self, category, **kw)
security.declareProtected( Permissions.View, 'isAcquiredMemberOf' )
def isAcquiredMemberOf(self, category):
......@@ -3205,7 +3205,7 @@ class Base( CopyContainer,
if workflow is not None:
changed = workflow.updateRoleMappingsFor(self)
if changed:
self.reindexObjectSecurity()
self.reindexObjectSecurity(activate_kw={'priority':4})
# Template Management
security.declareProtected(Permissions.View, 'getDocumentTemplateList')
......
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