--- a/src/pyams_content/workflow/notify.py Thu Apr 12 16:41:09 2018 +0200
+++ b/src/pyams_content/workflow/notify.py Thu Apr 12 16:42:57 2018 +0200
@@ -61,20 +61,21 @@
notified_roles = self.context.user_data['transition'].user_data['notify_roles']
if '*' in notified_roles:
return {}
+ notification_source = self.context.context
principals = set()
- for context in lineage(self.context.context):
+ for context in lineage(notification_source):
protection = IProtectedObject(context, None)
if protection is not None:
for role_id in notified_roles:
for principal in protection.get_principals(role_id):
if role_id == MANAGER_ROLE:
- if principal in self.context.context.managers:
+ if principal in notification_source.managers:
principals.add(principal)
else:
- restrictions = IManagerRestrictions(self.context.context, None)
+ restrictions = IManagerRestrictions(notification_source, None)
if restrictions is not None:
principal_restrictions = restrictions.get_restrictions(principal)
- if principal_restrictions.check_access(self.context.context,
+ if principal_restrictions.check_access(notification_source,
MANAGE_CONTENT_PERMISSION):
principals.add(principal)
else: