Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 try:
00003     from zope.deferredimport import deprecated
00004 except ImportError:
00005     # Zope < 2.10
00006     from borg.localrole.bbb.interfaces import IWorkspace
00007     from borg.localrole.bbb.interfaces import IGroupAwareWorkspace
00008     IWorkspace, IGroupAwareWorkspace    # make pyflakes happy...
00009 else:
00010     deprecated(
00011      "Please use borg.localrole.interfaces.ILocalRoleProvider instead",
00012      IWorkspace = 'borg.localrole.bbb.interfaces:IWorkspace'
00013      )
00014 
00015     deprecated(
00016      "Please use borg.localrole.interfaces.ILocalRoleProvider instead",
00017      IGroupAwareWorkspace = 'borg.localrole.bbb.interfaces:IGroupAwareWorkspace'
00018      )
00019 
00020 class ILocalRoleProvider(Interface):
00021     """An interface which allows querying the local roles on an object"""
00022 
00023     def getRoles(principal_id):
00024         """Returns an iterable of roles granted to the specified user object
00025         """
00026 
00027     def getAllRoles():
00028         """Returns an iterable consisting of tuples of the form:
00029             (principal_id, sequence_of_roles)
00030         """
00031 
00032 class IFactoryTempFolder(Interface):
00033     """A marker indicating the portal_factory temp folder"""