--- a/src/pyams_content/__init__.py Wed Jun 28 14:22:34 2017 +0200
+++ b/src/pyams_content/__init__.py Wed Jul 12 11:40:54 2017 +0200
@@ -25,6 +25,8 @@
from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, MANAGE_SITE_PERMISSION, MANAGE_TOOL_PERMISSION, \
CREATE_CONTENT_PERMISSION, MANAGE_CONTENT_PERMISSION, COMMENT_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION
+ from pyams_content.interfaces import WEBMASTER_ROLE, PILOT_ROLE, MANAGER_ROLE, OWNER_ROLE, CONTRIBUTOR_ROLE, \
+ READER_ROLE, OPERATOR_ROLE, GUEST_ROLE
from pyams_utils.interfaces import PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION, \
VIEW_SYSTEM_PERMISSION, MANAGE_SECURITY_PERMISSION, MANAGE_ROLES_PERMISSION
@@ -45,7 +47,7 @@
'title': _("Publish content")})
# register custom roles
- config.register_role({'id': 'pyams.Webmaster',
+ config.register_role({'id': WEBMASTER_ROLE,
'title': _("Webmaster (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
VIEW_SYSTEM_PERMISSION, MANAGE_SECURITY_PERMISSION, MANAGE_ROLES_PERMISSION,
@@ -53,7 +55,7 @@
CREATE_CONTENT_PERMISSION, MANAGE_CONTENT_PERMISSION,
COMMENT_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION},
'managers': {'system:admin', 'role:system.Manager', 'role:pyams.Webmaster'}})
- config.register_role({'id': 'pyams.Pilot',
+ config.register_role({'id': PILOT_ROLE,
'title': _("Pilot (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
VIEW_SYSTEM_PERMISSION, MANAGE_ROLES_PERMISSION,
@@ -61,19 +63,19 @@
MANAGE_CONTENT_PERMISSION, COMMENT_CONTENT_PERMISSION,
PUBLISH_CONTENT_PERMISSION},
'managers': {'system:admin', 'role:system.Manager', 'role:pyams.Webmaster'}})
- config.register_role({'id': 'pyams.Manager',
+ config.register_role({'id': MANAGER_ROLE,
'title': _("Manager (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
VIEW_SYSTEM_PERMISSION, MANAGE_CONTENT_PERMISSION,
COMMENT_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION},
'managers': {'system:admin', 'role:system.Manager', 'role:pyams.Webmaster',
'role:pyams.Pilot'}})
- config.register_role({'id': 'pyams.Owner',
+ config.register_role({'id': OWNER_ROLE,
'title': _("Creator (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
VIEW_SYSTEM_PERMISSION, MANAGE_ROLES_PERMISSION,
MANAGE_CONTENT_PERMISSION, COMMENT_CONTENT_PERMISSION}})
- config.register_role({'id': 'pyams.Contributor',
+ config.register_role({'id': CONTRIBUTOR_ROLE,
'title': _("Contributor (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
VIEW_SYSTEM_PERMISSION,
@@ -81,17 +83,17 @@
COMMENT_CONTENT_PERMISSION},
'managers': {'system:admin', 'role:system.Manager', 'role:pyams.Webmaster',
'role:pyams.Pilot', 'role:pyams.Owner'}})
- config.register_role({'id': 'pyams.Reader',
+ config.register_role({'id': READER_ROLE,
'title': _("Reader (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
VIEW_SYSTEM_PERMISSION, COMMENT_CONTENT_PERMISSION},
'managers': {'system:admin', 'role:system.Manager', 'role:pyams.Webmaster',
'role:pyams.Pilot', 'role:pyams.Manager', 'role:pyams.Contributor'}})
- config.register_role({'id': 'pyams.Operator',
+ config.register_role({'id': OPERATOR_ROLE,
'title': _("Operator (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, VIEW_SYSTEM_PERMISSION},
'managers': {'system:admin', 'role:system.Manager'}})
- config.register_role({'id': 'pyams.Guest',
+ config.register_role({'id': GUEST_ROLE,
'title': _("Guest user (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION},
'managers': {'system:admin', 'role:system.Manager', 'role:pyams.Webmaster',