vendor/CMF/1.6.3/CMFCore

view PortalObject.py @ 0:587011552858

import CMF 1.6.3
author bdelbosc
date Mon, 23 Apr 2007 13:58:01 +0000
parents
children
line source
1 ##############################################################################
2 #
3 # Copyright (c) 2001 Zope Corporation and Contributors. 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 """ PortalObject: The portal root object class
15 $Id$
16 """
18 from Globals import InitializeClass
19 from zope.interface import implements
21 from interfaces import ISiteRoot
22 from PortalFolder import PortalFolder
23 from Skinnable import SkinnableObjectManager
24 from permissions import AddPortalMember
25 from permissions import SetOwnPassword
26 from permissions import SetOwnProperties
27 from permissions import MailForgottenPassword
28 from permissions import RequestReview
29 from permissions import ReviewPortalContent
30 from permissions import AccessFuturePortalContent
32 PORTAL_SKINS_TOOL_ID = 'portal_skins'
35 class PortalObjectBase(PortalFolder, SkinnableObjectManager):
37 implements(ISiteRoot)
38 meta_type = 'Portal Site'
39 _isPortalRoot = 1
41 # Ensure certain attributes come from the correct base class.
42 __getattr__ = SkinnableObjectManager.__getattr__
43 __of__ = SkinnableObjectManager.__of__
44 _checkId = SkinnableObjectManager._checkId
46 # Ensure all necessary permissions exist.
47 __ac_permissions__ = (
48 (AddPortalMember, ()),
49 (SetOwnPassword, ()),
50 (SetOwnProperties, ()),
51 (MailForgottenPassword, ()),
52 (RequestReview, ()),
53 (ReviewPortalContent, ()),
54 (AccessFuturePortalContent, ()),
55 )
57 def getSkinsFolderName(self):
58 return PORTAL_SKINS_TOOL_ID
60 InitializeClass(PortalObjectBase)