Back to index

plone3  3.1.7
localroles.py
Go to the documentation of this file.
00001 from zope.interface import implements
00002 from plone.app.workflow.interfaces import ISharingPageRole
00003 from plone.app.workflow import permissions
00004 from Products.CMFCore import permissions as core_permissions
00005 
00006 from Products.CMFPlone import PloneMessageFactory as _
00007 
00008 """
00009 XXX: policy explanation
00010 """
00011 
00012 # These are for everyone
00013 
00014 class ReaderRole(object):
00015     implements(ISharingPageRole)
00016     
00017     title = _(u"title_can_view", default=u"Can view")
00018     required_permission = permissions.DelegateReaderRole
00019     
00020 class EditorRole(object):
00021     implements(ISharingPageRole)
00022     
00023     title = _(u"title_can_edit", default=u"Can edit")
00024     required_permission = permissions.DelegateEditorRole
00025     
00026 class ContributorRole(object):
00027     implements(ISharingPageRole)
00028     
00029     title = _(u"title_can_add", default=u"Can add")
00030     required_permission = permissions.DelegateContributorRole
00031     
00032 class ReviewerRole(object):
00033     implements(ISharingPageRole)
00034     
00035     title = _(u"title_can_review", default=u"Can review")
00036     required_permission = permissions.DelegateReviewerRole
00037 
00038 # Only managers can manage these
00039 
00040 #class ManagerRole(object):
00041 #    implements(ISharingPageRole)
00042 #    
00043 #    title = _(u"title_can_manage", default=u"Can manage")
00044 #    required_permission = core_permissions.ManagePortal
00045 
00046 # Low level role that should never be dispayed
00047 
00048 #class OwnerRole(object):
00049 #    implements(ISharingPageRole)
00050 #
00051 #    title = _(u"title_can_own", default=u"Can own")
00052 #    required_permission = core_permissions.ManagePortal
00053 
00054 #class MemberRole(object):
00055 #    implements(ISharingPageRole)
00056 #
00057 #    title = _(u"title_can_subscribe", default=u"Can subscribe")
00058 #    required_permission = core_permissions.ManagePortal