10 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
10 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
11 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
11 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
12 # FOR A PARTICULAR PURPOSE. |
12 # FOR A PARTICULAR PURPOSE. |
13 # |
13 # |
14 |
14 |
15 __docformat__ = 'restructuredtext' |
|
16 |
|
17 from persistent import Persistent |
15 from persistent import Persistent |
18 from pyramid.events import subscriber |
16 from pyramid.events import subscriber |
19 from zope.interface import implementer |
17 from zope.interface import implementer |
20 |
18 |
21 from pyams_content.component.illustration.interfaces import IIllustrationTarget |
19 from pyams_content.component.illustration.interfaces import IIllustrationTarget |
|
20 from pyams_content.component.theme import ICollectionsManagerTarget |
22 from pyams_content.component.theme.interfaces import ITagsManagerTarget |
21 from pyams_content.component.theme.interfaces import ITagsManagerTarget |
23 from pyams_content.features.alert.interfaces import IAlertTarget |
22 from pyams_content.features.alert.interfaces import IAlertTarget |
24 from pyams_content.features.footer.interfaces import IFooterTarget |
23 from pyams_content.features.footer.interfaces import IFooterTarget |
25 from pyams_content.features.header.interfaces import IHeaderTarget |
24 from pyams_content.features.header.interfaces import IHeaderTarget |
26 from pyams_content.features.preview.interfaces import IPreviewTarget |
25 from pyams_content.features.preview.interfaces import IPreviewTarget |
27 from pyams_content.features.redirect.interfaces import IRedirectionManagerTarget |
26 from pyams_content.features.redirect.interfaces import IRedirectionManagerTarget |
28 from pyams_content.features.share.interfaces import ISocialShareManagerTarget |
27 from pyams_content.features.share.interfaces import ISocialShareManagerTarget |
29 from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, OPERATOR_ROLE, WEBMASTER_ROLE |
28 from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, OPERATOR_ROLE, WEBMASTER_ROLE |
30 from pyams_content.root.interfaces import ISiteRoot, ISiteRootBackOfficeConfiguration, ISiteRootConfiguration, \ |
29 from pyams_content.root.interfaces import ISiteRoot, ISiteRootBackOfficeConfiguration, \ |
31 ISiteRootRoles, ISiteRootToolsConfiguration |
30 ISiteRootConfiguration, ISiteRootRoles, ISiteRootToolsConfiguration |
32 from pyams_form.interfaces.form import IFormContextPermissionChecker |
31 from pyams_form.interfaces.form import IFormContextPermissionChecker |
33 from pyams_portal.interfaces import DESIGNER_ROLE, IPortalContext |
32 from pyams_portal.interfaces import DESIGNER_ROLE, IPortalContext |
34 from pyams_security.interfaces import IDefaultProtectionPolicy, IGrantedRoleEvent, ISecurityManager, SYSTEM_ADMIN_ROLE |
33 from pyams_security.interfaces import IDefaultProtectionPolicy, IGrantedRoleEvent, \ |
|
34 ISecurityManager, SYSTEM_ADMIN_ROLE |
35 from pyams_security.property import RolePrincipalsFieldProperty |
35 from pyams_security.property import RolePrincipalsFieldProperty |
36 from pyams_security.security import ProtectedObject |
36 from pyams_security.security import ProtectedObject |
37 from pyams_skin.configuration import BackOfficeConfiguration, Configuration |
37 from pyams_skin.configuration import BackOfficeConfiguration, Configuration |
38 from pyams_skin.interfaces.configuration import IBackOfficeConfiguration, IConfiguration |
38 from pyams_skin.interfaces.configuration import IBackOfficeConfiguration, IConfiguration |
39 from pyams_skin.skin import UserSkinnableContent |
39 from pyams_skin.skin import UserSkinnableContent |
42 from pyams_utils.interfaces.site import ISiteRootFactory |
42 from pyams_utils.interfaces.site import ISiteRootFactory |
43 from pyams_utils.registry import get_utility, utility_config |
43 from pyams_utils.registry import get_utility, utility_config |
44 from pyams_utils.site import BaseSiteRoot |
44 from pyams_utils.site import BaseSiteRoot |
45 from pyams_utils.traversing import get_parent |
45 from pyams_utils.traversing import get_parent |
46 |
46 |
|
47 |
|
48 __docformat__ = 'restructuredtext' |
|
49 |
47 from pyams_content import _ |
50 from pyams_content import _ |
48 |
51 |
49 |
52 |
50 @implementer(IDefaultProtectionPolicy, ISiteRoot, ISiteRootRoles, IPortalContext, ITagsManagerTarget, |
53 @implementer(IDefaultProtectionPolicy, ISiteRoot, ISiteRootRoles, IPortalContext, |
51 IIllustrationTarget, IHeaderTarget, IFooterTarget, ISocialShareManagerTarget, IAlertTarget, |
54 ITagsManagerTarget, ICollectionsManagerTarget, IIllustrationTarget, |
52 IRedirectionManagerTarget, IPreviewTarget) |
55 IHeaderTarget, IFooterTarget, ISocialShareManagerTarget, |
|
56 IAlertTarget, IRedirectionManagerTarget, IPreviewTarget) |
53 class SiteRoot(ProtectedObject, BaseSiteRoot, UserSkinnableContent): |
57 class SiteRoot(ProtectedObject, BaseSiteRoot, UserSkinnableContent): |
54 """Main site root""" |
58 """Main site root""" |
55 |
59 |
56 __roles__ = (SYSTEM_ADMIN_ROLE, WEBMASTER_ROLE, OPERATOR_ROLE, DESIGNER_ROLE) |
60 __roles__ = (SYSTEM_ADMIN_ROLE, WEBMASTER_ROLE, OPERATOR_ROLE, DESIGNER_ROLE) |
57 |
61 |