# HG changeset patch # User Thierry Florac # Date 1499852599 -7200 # Node ID 58cde0290f692753bfe3d6300cd2a695930a03d9 # Parent 0ec0c7bee139ed2c212971d6809e799531d8cbca Added role for templates managers diff -r 0ec0c7bee139 -r 58cde0290f69 src/pyams_content/root/__init__.py --- a/src/pyams_content/root/__init__.py Wed Jul 12 11:42:15 2017 +0200 +++ b/src/pyams_content/root/__init__.py Wed Jul 12 11:43:19 2017 +0200 @@ -18,6 +18,7 @@ # import standard library # import interfaces +from pyams_content.interfaces import WEBMASTER_ROLE, OPERATOR_ROLE from pyams_content.root.interfaces import ISiteRootRoles, ISiteRootConfiguration, ISiteRoot, \ ISiteRootToolsConfiguration, ISiteRootBackOfficeConfiguration from pyams_portal.interfaces import IPortalContext @@ -56,13 +57,14 @@ class SiteRoot(ProtectedObject, BaseSiteRoot, UserSkinnableContent): """Main site root""" - __roles__ = ('system.Manager', 'pyams.Webmaster', 'pyams.Operator') + __roles__ = ('system.Manager', WEBMASTER_ROLE, OPERATOR_ROLE, 'pyams.TemplatesManager') roles_interface = ISiteRootRoles managers = RolePrincipalsFieldProperty(ISiteRootRoles['managers']) webmasters = RolePrincipalsFieldProperty(ISiteRootRoles['webmasters']) operators = RolePrincipalsFieldProperty(ISiteRootRoles['operators']) + templates_managers = RolePrincipalsFieldProperty(ISiteRootRoles['templates_managers']) @implementer(ISiteRootConfiguration) diff -r 0ec0c7bee139 -r 58cde0290f69 src/pyams_content/root/interfaces/__init__.py --- a/src/pyams_content/root/interfaces/__init__.py Wed Jul 12 11:42:15 2017 +0200 +++ b/src/pyams_content/root/interfaces/__init__.py Wed Jul 12 11:43:19 2017 +0200 @@ -41,6 +41,10 @@ role_id='pyams.Webmaster', required=False) + templates_managers = PrincipalsSet(title=_("Templates managers"), + role_id='pyams.TemplatesManager', + required=False) + operators = Principal(title=_("Operators group"), description=_("Name of group containing all roles owners"), role_id='pyams.Operator',