Products.MightyCal.Security.SecurityPolicy (version 1.6)
index
/home/zope/lib/python/Products/MightyCal/Security/SecurityPolicy.py

Define the security policy for the MightyCal.  We use a Dictionary object,
whose slots define permission settings for each MightyCal subobject.
These permission settings are defined by means of a further embedded
dictionary, with slots for each Role, and within those slots, a List object
of the permissions to be given to that Role in regards to the MightyCal subobject

 
Modules
            
Dumper
sys

 
Functions
            
applyPermissions(objectRef)
Apply permissions to the various objects created for the MightyCal
resetPermissionsMemory()
Clear our permissions 'memory' dictionary so that we can re-examine our hierarchy and apply permissions afresh

 
Data
             ANONYMOUS_ROLE = 'Anonymous'

CALENDAR_ADMIN_ROLE = 'CalendarAdmin'

CALENDAR_COLUMN = 'CalendarColumn'

CALENDAR_CONSOLE_POLICY = 'Calendar Console Policy'

CALENDAR_OBJECT = 'Calendar'

CALENDAR_PANEL = 'CalendarPanel'

CALENDAR_REGISTRY = 'CalendarRegistry'

CALENDAR_STATUS_CONSOLE = 'StatusConsole'

COMMON_ID = 'Common'

CRITERIA_POLICY = 'Policy for NamedCriterion and related objects'

CRITERIA_SET = 'CriteriaSet'

CSS_DIR = 'css'

CURRENT_CALENDAR_SESSION_DATA = 'Current Calendar'

DATA_ENTRY_HANDLER = 'DataEntryHandler'

DATA_ENTRY_TRANSACTION = 'DataEntryTransaction'

DEFAULT_POLICY = 'Default Security Policy'

DIALOG_BOX = 'dialogBox'

DIALOG_BOX_FINISH = 'finishDialog'

DTML_DIR = 'dtml'

EVENT_CATALOG = 'EventCatalog'

EVENT_COLLECTION = 'EventCollection'

EVENT_OBJECT = 'Event'

EVENT_SPEC_DIR = 'event_specs'

EVENT_TYPE_COLLECTION = 'EventTypeCollection'

EVENT_TYPE_OBJECT = 'EventType'

EVENT_TYPE_REGISTRY = 'EventTypeRegistry'

FALSE = 0

FIELD_SPEC = 'FieldSpec'

ICONS_DIR = 'icons'

ICONS_FOLDER = 'Icons'

IMAGE_COLLECTION = 'ImageCollection'

IMAGE_OBJECT = 'Image'

INFO = 0

LOCALHOST_BY_NAME = 'localhost'

LOCALHOST_BY_NUMBER = '127.0.0.1'

MAIL_HOST = 'MailHost'

MANAGER_PERMISSIONS = ('View management screens', 'Manage Access Rules', 'Create Transient Objects', 'Add Documents, Images, and Files', 'Delete objects', 'View management screens', 'Change permissions', 'Access Transient Objects', 'Access arbitrary user session data', 'Access session data', 'Access contents information', 'Manage Transient Object Container', 'View', 'Manage properties', 'Query Vocabulary', 'Administer Calendar')

MANAGER_ROLE = 'Manager'

MIGHTYCAL_COLUMN = 'MightyCalColumn'

MIGHTYCAL_CONSOLE = 'MightyCalConsole'

MIGHTYCAL_CONSOLE_POLICY = 'MightyCal Console Policy'

MIGHTYCAL_PANEL = 'MightyCalPanel'

MTL_TAG_OBJECT = 'MTLTagObject'

NAMED_CRITERION_OBJECT = 'NamedCriterion'

OBJECT_CATALOG = 'ObjectCatalog'

PRODUCT_NAME = 'MightyCal'

PROPAGATE_PERMISSIONS_METHOD = 'propagatePermissions'

REGISTERED_USER_ROLE = 'RegisteredUserRole'

SEARCH_WIDGET_COLLECTION = 'SearchWidgetCollection'

SEARCH_WIDGET_OBJECT = 'SearchWidget'

SECURITY_POLICY = {'Calendar': {'CalendarAdmin': ('Administer Calendar', 'View management screens'), 'Manager': ('Add Calendars', 'Administer Calendar'), 'XMLRPC Access Role': ('XMLRPC Access',)}, 'Calendar Console Policy': {'CalendarAdmin': ('Administer Calendar', 'View management screens', 'Manage StatusConsole', 'View StatusConsole', 'Access Transient Objects', 'Access arbitrary user session data', 'Access session data', 'Access contents information', 'View'), 'Manager': ('Add MightyCal Subobject', 'Administer Calendar', 'Manage StatusConsole', 'View StatusConsole')}, 'CalendarRegistry': {'Manager': ('Add Calendars', 'Administer Calendar')}, 'DataEntryHandler': {'CalendarAdmin': ('Add Events',), 'Manager': ('Add Events', 'XMLRPC Access'), 'XMLRPC Access Role': ('XMLRPC Access', 'Access Transient Objects', 'Access arbitrary user session data', 'Access session data')}, 'Default Security Policy': {}, 'EventCatalog': {'CalendarAdmin': ('Add Events', 'Delete objects', 'View management screens', 'Search ZCatalog', 'Search ZCatalogIndex'), 'EventSubmitterRole': ('Add Events',), 'Manager': ('Add Events', 'Manage ZCatalog Entries', 'Manage ZCatalogIndex Entries', 'Search ZCatalog', 'Search ZCatalogIndex')}, 'EventType': {'CalendarAdmin': ('Add EventTypes', 'Add FieldSpec', 'Delete objects', 'View management screens'), 'Manager': ('Add EventTypes', 'Add FieldSpec')}, 'EventTypeRegistry': {'CalendarAdmin': ('Add EventTypes', 'Delete objects', 'View management screens'), 'Manager': ('Add EventTypes',)}, 'FieldSpec': {'CalendarAdmin': ('Add FieldSpec', 'Delete objects', 'View management screens'), 'Manager': ('Add FieldSpec',)}, 'Image': {'Anonymous': ('View',), 'CalendarAdmin': ('Add Documents, Images, and Files', 'View management screens', 'Change Images and Files', 'View'), 'Manager': ('Change Images and Files', 'View')}, ...}

SECURITY_ROLES = ('Manager', 'CalendarAdmin', 'EventSubmitterRole', 'RegisteredUserRole', 'XMLRPC Access Role', 'Anonymous')

SERIAL_PROPERTY = 'serial'

SFOLDER_OBJECT = 'SFolder'

STYLE_COLLECTION = 'StyleCollection'

STYLE_POLICY = 'Policy for Stylesheet and related objects'

SUBMITTER_ROLE = 'EventSubmitterRole'

TAG_REGISTRY = 'TagRegistry'

TEMPLATE_COLLECTION = 'TemplateCollection'

TEMPLATE_OBJECT = 'Template'

TEMPLATE_POLICY = 'Policy for Template and related objects'

TEMP_FOLDER = 'TempFolder'

TRUE = 1

USER_OBJECT = 'CalendarUser'

USER_POLICY = 'Policy for Users and related objects'

USER_REGISTRY = 'acl_users'

WIDGET_MAKER_REGISTRY = 'WidgetMakerRegistry'

XMLRPC_ACCESS_ROLE = 'XMLRPC Access Role'

XMLRPC_HANDLER = 'XmlRpcHandler'

XML_SERIALIZER = 'XmlSerializer'

XML_START_TAG = '<?xml version="1.0" ?>'

XSLT_DIR = 'xslt'

__file__ = '/home/zope/lib/python/Products/MightyCal/Security/SecurityPolicy.pyc'

__name__ = 'Products.MightyCal.Security.SecurityPolicy'

__version__ = '$Revision: 1.6 $'

permAccessContentsInfo = 'Access contents information'

permAccessSessionData = 'Access session data'

permAccessTransientObjects = 'Access Transient Objects'

permAccessUserSessionData = 'Access arbitrary user session data'

permAddCalendar = 'Add Calendars'

permAddDocsAndImages = 'Add Documents, Images, and Files'

permAddEvent = 'Add Events'

permAddEventType = 'Add EventTypes'

permAddFieldSpec = 'Add FieldSpec'

permAddMightyCal = 'Add MightyCals'

permAddMightyCalSubobject = 'Add MightyCal Subobject'

permAddStyleElement = 'Add StyleElements'

permAddStylesheet = 'Add Stylesheets'

permAddTemplate = 'Add Templates'

permAddUser = 'Add CalendarUser'

permAdministerCalendar = 'Administer Calendar'

permChangeFilesAndImages = 'Change Images and Files'

permChangePermissions = 'Change permissions'

permCreateTransientObjects = 'Create Transient Objects'

permDelObjs = 'Delete objects'

permManageAccessRules = 'Manage Access Rules'

permManageProperties = 'Manage properties'

permManageStatusConsole = 'Manage StatusConsole'

permManageTransientObjectContainer = 'Manage Transient Object Container'

permManageUsers = 'Manage users'

permManageZCatalogEntries = 'Manage ZCatalog Entries'

permManageZCatalogIndexEntries = 'Manage ZCatalogIndex Entries'

permQueryVocabulary = 'Query Vocabulary'

permSearchZCatalog = 'Search ZCatalog'

permSearchZCatalogIndex = 'Search ZCatalogIndex'

permUseMailhostServices = 'Use mailhost services'

permView = 'View'

permViewDebugScreen = 'View Debug Screens'

permViewMgmtScreen = 'View management screens'

permViewStatusConsole = 'View StatusConsole'

permXMLRPCAccess = 'XMLRPC Access'

permissionsMemory = {}