# HG changeset patch # User Thierry Florac # Date 1507106638 -7200 # Node ID e689a4341d479fc71344dec1486d5a5fbf838589 # Parent 6a26b2b0cb470e479df0c1df33a07fafa3e47691 Use role name constant diff -r 6a26b2b0cb47 -r e689a4341d47 src/pyams_content/workflow/__init__.py --- 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):