--- a/src/pyams_security/__init__.py Mon Jun 11 16:09:15 2018 +0200
+++ b/src/pyams_security/__init__.py Tue Jun 26 15:00:38 2018 +0200
@@ -24,7 +24,7 @@
from pyramid.i18n import TranslationStringFactory
_ = TranslationStringFactory('pyams_security')
-from pyams_security.interfaces import ADMIN_USER_ID
+from pyams_security.interfaces import ADMIN_USER_ID, SYSTEM_ADMIN_ROLE
from pyams_utils.interfaces import PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION, VIEW_SYSTEM_PERMISSION, \
MANAGE_SYSTEM_PERMISSION, MANAGE_SECURITY_PERMISSION, MANAGE_ROLES_PERMISSION, MANAGE_SKIN_PERMISSION
@@ -55,9 +55,9 @@
'title': _("Manage roles")})
# register custom roles
- config.register_role({'id': 'system.Manager',
+ config.register_role({'id': SYSTEM_ADMIN_ROLE,
'title': "System manager (role)",
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
MANAGE_SYSTEM_PERMISSION, VIEW_SYSTEM_PERMISSION, MANAGE_SECURITY_PERMISSION,
MANAGE_SKIN_PERMISSION, MANAGE_ROLES_PERMISSION},
- 'managers': {ADMIN_USER_ID, 'role:system.Manager'}})
+ 'managers': {ADMIN_USER_ID, 'role:{0}'.format(SYSTEM_ADMIN_ROLE)}})
--- a/src/pyams_security/interfaces/__init__.py Mon Jun 11 16:09:15 2018 +0200
+++ b/src/pyams_security/interfaces/__init__.py Tue Jun 26 15:00:38 2018 +0200
@@ -41,6 +41,8 @@
INTERNAL_USER_LOGIN = 'internal'
INTERNAL_USER_ID = '{0}:{1}'.format(SYSTEM_PREFIX, INTERNAL_USER_LOGIN)
+SYSTEM_ADMIN_ROLE = 'system.Manager'
+
#
# Permissions constants and interfaces