diff -r 1fe028e17f70 -r 34e6d07ea2e9 src/pyams_content/root/interfaces.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_content/root/interfaces.py Tue Nov 06 14:40:22 2018 +0100 @@ -0,0 +1,74 @@ +# +# Copyright (c) 2008-2015 Thierry Florac +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. +# + +__docformat__ = 'restructuredtext' + +from zope.interface import Attribute, Interface + +from pyams_content import _ +from pyams_content.interfaces import OPERATOR_ROLE, WEBMASTER_ROLE +from pyams_portal.interfaces import DESIGNER_ROLE +from pyams_security.interfaces import SYSTEM_ADMIN_ROLE +from pyams_security.schema import Principal, PrincipalsSet +from pyams_skin.interfaces.configuration import IBackOfficeConfiguration, IConfiguration +from pyams_utils.interfaces.site import ISiteRoot as ISiteRootBase + + +class ISiteRoot(ISiteRootBase): + """Main site root interface""" + + +class ISiteRootRoles(Interface): + """Main site roles""" + + managers = PrincipalsSet(title=_("Site managers"), + role_id=SYSTEM_ADMIN_ROLE, + required=False) + + webmasters = PrincipalsSet(title=_("Webmasters"), + role_id=WEBMASTER_ROLE, + required=False) + + designers = PrincipalsSet(title=_("Templates managers"), + role_id=DESIGNER_ROLE, + required=False) + + operators = Principal(title=_("Operators group"), + description=_("Name of group containing all roles owners"), + role_id=OPERATOR_ROLE, + required=False) + + +class ISiteRootConfiguration(IConfiguration): + """Site root configuration interface""" + + +class ISiteRootToolsConfiguration(Interface): + """Site root tools configuration interface""" + + tables_name = Attribute("References tables manager name") + + pictograms_table_name = Attribute("Pictograms reference table name") + + tools_name = Attribute("Tools name") + + views_tool_name = Attribute("Views tool name") + forms_tool_name = Attribute("Forms tool name") + imagemaps_tool_name = Attribute("Image maps tool name") + logos_tool_name = Attribute("Logos tool name") + + news_tool_name = Attribute("News tool name") + topics_tool_name = Attribute("Topics tool name") + + +class ISiteRootBackOfficeConfiguration(IBackOfficeConfiguration): + """Site root back-office configuration interface"""