src/pyams_content/root/interfaces.py
changeset 1059 34e6d07ea2e9
parent 972 bfdb9bbc9175
equal deleted inserted replaced
1058:1fe028e17f70 1059:34e6d07ea2e9
       
     1 #
       
     2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 from zope.interface import Attribute, Interface
       
    16 
       
    17 from pyams_content import _
       
    18 from pyams_content.interfaces import OPERATOR_ROLE, WEBMASTER_ROLE
       
    19 from pyams_portal.interfaces import DESIGNER_ROLE
       
    20 from pyams_security.interfaces import SYSTEM_ADMIN_ROLE
       
    21 from pyams_security.schema import Principal, PrincipalsSet
       
    22 from pyams_skin.interfaces.configuration import IBackOfficeConfiguration, IConfiguration
       
    23 from pyams_utils.interfaces.site import ISiteRoot as ISiteRootBase
       
    24 
       
    25 
       
    26 class ISiteRoot(ISiteRootBase):
       
    27     """Main site root interface"""
       
    28 
       
    29 
       
    30 class ISiteRootRoles(Interface):
       
    31     """Main site roles"""
       
    32 
       
    33     managers = PrincipalsSet(title=_("Site managers"),
       
    34                              role_id=SYSTEM_ADMIN_ROLE,
       
    35                              required=False)
       
    36 
       
    37     webmasters = PrincipalsSet(title=_("Webmasters"),
       
    38                                role_id=WEBMASTER_ROLE,
       
    39                                required=False)
       
    40 
       
    41     designers = PrincipalsSet(title=_("Templates managers"),
       
    42                               role_id=DESIGNER_ROLE,
       
    43                               required=False)
       
    44 
       
    45     operators = Principal(title=_("Operators group"),
       
    46                           description=_("Name of group containing all roles owners"),
       
    47                           role_id=OPERATOR_ROLE,
       
    48                           required=False)
       
    49 
       
    50 
       
    51 class ISiteRootConfiguration(IConfiguration):
       
    52     """Site root configuration interface"""
       
    53 
       
    54 
       
    55 class ISiteRootToolsConfiguration(Interface):
       
    56     """Site root tools configuration interface"""
       
    57 
       
    58     tables_name = Attribute("References tables manager name")
       
    59 
       
    60     pictograms_table_name = Attribute("Pictograms reference table name")
       
    61 
       
    62     tools_name = Attribute("Tools name")
       
    63 
       
    64     views_tool_name = Attribute("Views tool name")
       
    65     forms_tool_name = Attribute("Forms tool name")
       
    66     imagemaps_tool_name = Attribute("Image maps tool name")
       
    67     logos_tool_name = Attribute("Logos tool name")
       
    68 
       
    69     news_tool_name = Attribute("News tool name")
       
    70     topics_tool_name = Attribute("Topics tool name")
       
    71 
       
    72 
       
    73 class ISiteRootBackOfficeConfiguration(IBackOfficeConfiguration):
       
    74     """Site root back-office configuration interface"""