--- 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']