# HG changeset patch # User Thierry Florac # Date 1505287405 -7200 # Node ID 363efe154011af8b569da83ea94c6deac659782a # Parent 890d3c1e0c71644a03b2f0ab432f95cd387356b3 Remove control on restrictions for local content managers diff -r 890d3c1e0c71 -r 363efe154011 src/pyams_content/workflow/notify.py --- a/src/pyams_content/workflow/notify.py Tue Sep 12 16:45:45 2017 +0200 +++ b/src/pyams_content/workflow/notify.py Wed Sep 13 09:23:25 2017 +0200 @@ -68,11 +68,15 @@ for role_id in notified_roles: for principal in protection.get_principals(role_id): if role_id == MANAGER_ROLE: - restrictions = IManagerRestrictions(self.context.context, None) - if restrictions is not None: - principal_restrictions = restrictions.get_restrictions(principal) - if principal_restrictions.check_access(context, MANAGE_CONTENT_PERMISSION): - principals.add(principal) + if principal in self.context.context.managers: + principals.add(principal) + else: + restrictions = IManagerRestrictions(self.context.context, None) + if restrictions is not None: + principal_restrictions = restrictions.get_restrictions(principal) + if principal_restrictions.check_access(self.context.context, + MANAGE_CONTENT_PERMISSION): + principals.add(principal) else: principals.add(principal) source_id = self.context.source['id']