src/pyams_content/workflow/__init__.py
changeset 195 e689a4341d47
parent 153 6149158c48c5
child 303 4109e6d2991b
--- a/src/pyams_content/workflow/__init__.py	Tue Oct 03 15:48:44 2017 +0200
+++ b/src/pyams_content/workflow/__init__.py	Wed Oct 04 10:43:58 2017 +0200
@@ -19,7 +19,7 @@
 # import interfaces
 from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, MANAGE_CONTENT_PERMISSION, \
     PUBLISH_CONTENT_PERMISSION, CREATE_CONTENT_PERMISSION
-from pyams_content.interfaces import WEBMASTER_ROLE, PILOT_ROLE, MANAGER_ROLE, OWNER_ROLE
+from pyams_content.interfaces import WEBMASTER_ROLE, PILOT_ROLE, MANAGER_ROLE, OWNER_ROLE, READER_ROLE
 from pyams_content.shared.common.interfaces import IWfSharedContentRoles, IManagerRestrictions
 from pyams_content.workflow.interfaces import IContentWorkflow
 from pyams_security.interfaces import IRoleProtectedObject
@@ -248,7 +248,7 @@
     """Remove readers when a content is archived"""
     roles = IWfSharedContentRoles(context, None)
     if roles is not None:
-        IRoleProtectedObject(context).revoke_role('pyams.Reader', roles.readers)
+        IRoleProtectedObject(context).revoke_role(READER_ROLE, roles.readers)
 
 
 def clone_action(wf, context):