Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.interfaces._tools.IMembershipTool Class Reference
Inheritance diagram for CMFCore.interfaces._tools.IMembershipTool:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.interfaces._tools.IMembershipTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setPassword
def getAuthenticatedMember
def isAnonymousUser
def checkPermission
def credentialsChanged
def getMembersFolder
def getHomeFolder
def getHomeUrl
def getMemberById
def listMemberIds
def listMembers
def getCandidateLocalRoles
def setLocalRoles
def deleteLocalRoles
def addMember
def deleteMembers
def getPortalRoles
def setRoleMapping
def getMappedRole
def getMemberareaCreationFlag
def setMemberareaCreationFlag
def createMemberArea
def deleteMemberArea

Static Public Attributes

tuple id

Detailed Description

Manage policy of how and where to store and retrieve members and
    their member folders.

Definition at line 633 of file _tools.py.


Member Function Documentation

def CMFCore.interfaces._tools.IMembershipTool.addMember (   id,
  password,
  roles,
  domains 
)
Adds a new member to the user folder.

o Security checks will have already been performed. Called by
  the registration tool.

Permission:  Private (Python only)

Definition at line 800 of file _tools.py.

00800 
00801     def addMember(id, password, roles, domains):
00802         """ Adds a new member to the user folder.
00803 
00804         o Security checks will have already been performed. Called by
00805           the registration tool.
00806 
00807         Permission:  Private (Python only)
00808         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IMembershipTool.checkPermission (   permissionName,
  object,
  subobjectName = None 
)
Return True if the current user has the given permission on
    the given object or subobject.

o 'permissionName' is the string identifying the permission.

o 'object' is the object being checked.

o 'subobjectName', if passed, is the attribute name to be checked;
  if None, test the main object itself.

o Permission:  Public

Definition at line 666 of file _tools.py.

00666 
00667     def checkPermission(permissionName, object, subobjectName=None):
00668         """ Return True if the current user has the given permission on
00669             the given object or subobject.
00670 
00671         o 'permissionName' is the string identifying the permission.
00672 
00673         o 'object' is the object being checked.
00674 
00675         o 'subobjectName', if passed, is the attribute name to be checked;
00676           if None, test the main object itself.
00677 
00678         o Permission:  Public
00679         """

Here is the caller graph for this function:

Return a member area for the given member, creating if necessary.

o If member area creation is disabled, return None.

o 'member_id', if passed, is the ID of the member whose folder is
  to be created;  if not passed, default to the authenticated member.

o Permission:  Public # XXX?

Definition at line 869 of file _tools.py.

00869 
00870     def createMemberArea(member_id=''):
00871         """ Return a member area for the given member, creating if necessary.
00872 
00873         o If member area creation is disabled, return None.
00874 
00875         o 'member_id', if passed, is the ID of the member whose folder is
00876           to be created;  if not passed, default to the authenticated member.
00877 
00878         o Permission:  Public # XXX?
00879         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IMembershipTool.credentialsChanged (   password,
  REQUEST = None 
)
Notify the authentication mechanism that this user has
    changed passwords.

o The authentication mechanism can use this notification to update
  the authentication cookie.

o Note that this call should *not* cause any change at all to user
  databases.

o XXX:  should be an event.

o XXX:  should this be in scope for this tool?  Or should it be
done by the view class for the password update view?

Permission:  Public # XXX?

Definition at line 680 of file _tools.py.

00680 
00681     def credentialsChanged(password, REQUEST=None):
00682         """ Notify the authentication mechanism that this user has
00683             changed passwords.
00684 
00685         o The authentication mechanism can use this notification to update
00686           the authentication cookie.
00687 
00688         o Note that this call should *not* cause any change at all to user
00689           databases.
00690 
00691         o XXX:  should be an event.
00692 
00693         o XXX:  should this be in scope for this tool?  Or should it be
00694                 done by the view class for the password update view?
00695 
00696         Permission:  Public # XXX?
00697         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IMembershipTool.deleteLocalRoles (   obj,
  member_ids,
  reindex = True,
  recursive = False 
)
Remove local roles of specified members from an object.

o 'obj' is the object on which to remove the role.

o 'member_ids' is a sequence of user IDs from which to remove the role.

o If 'reindex' is True, then reindex the security-related attributes
  of the object and all subobjects.

o if 'recursive' is True, recurse over all subobjects of 'object'.

o Raise Unauthorized if the currently-authenticated member cannot
  assign 'member_role' on 'obj'.

Permission:  Public

Definition at line 782 of file _tools.py.

00782 
00783     def deleteLocalRoles(obj, member_ids, reindex=True, recursive=False):
00784         """ Remove local roles of specified members from an object.
00785 
00786         o 'obj' is the object on which to remove the role.
00787 
00788         o 'member_ids' is a sequence of user IDs from which to remove the role.
00789 
00790         o If 'reindex' is True, then reindex the security-related attributes
00791           of the object and all subobjects.
00792 
00793         o if 'recursive' is True, recurse over all subobjects of 'object'.
00794 
00795         o Raise Unauthorized if the currently-authenticated member cannot
00796           assign 'member_role' on 'obj'.
00797 
00798         Permission:  Public
00799         """

Here is the caller graph for this function:

Delete member area of specified member

o Return True if a member area previously existed for the member.

o 'member_id' identifies the member whose member is to be removed.

o Permission:  Manage users

Definition at line 880 of file _tools.py.

00880 
00881     def deleteMemberArea(member_id):
00882         """ Delete member area of specified member
00883 
00884         o Return True if a member area previously existed for the member.
00885 
00886         o 'member_id' identifies the member whose member is to be removed.
00887 
00888         o Permission:  Manage users
00889         """
00890 
00891 
00892 #
00893 #   Metadata tool interface
#

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IMembershipTool.deleteMembers (   member_ids,
  delete_memberareas = 1,
  delete_localroles = 1 
)
Remove specified members from the site.

o Returns a sequence of member_ids of members actually deleted.

o Remove the members from the user folder.

o 'member_ids' is a sequence of one or more user IDs to remove.

o Remove corresponding member data in the memberdata tool.

o If 'delete_memberareas' is True, delete members' home folders
  including all content items.

o If 'delete_localroles' is true, recursively delete members' local
  roles, starting from the site root.

o Permission:  Manage users

Definition at line 809 of file _tools.py.

00809 
00810     def deleteMembers(member_ids, delete_memberareas=1, delete_localroles=1):
00811         """ Remove specified members from the site.
00812 
00813         o Returns a sequence of member_ids of members actually deleted.
00814 
00815         o Remove the members from the user folder.
00816 
00817         o 'member_ids' is a sequence of one or more user IDs to remove.
00818 
00819         o Remove corresponding member data in the memberdata tool.
00820 
00821         o If 'delete_memberareas' is True, delete members' home folders
00822           including all content items.
00823 
00824         o If 'delete_localroles' is true, recursively delete members' local
00825           roles, starting from the site root.
00826 
00827         o Permission:  Manage users
00828         """

Return the currently authenticated member object

o If no valid credentials are passed in the request, return
  the Anonymous User.

o Permission:  Public

Definition at line 651 of file _tools.py.

00651 
00652     def getAuthenticatedMember():
00653         """ Return the currently authenticated member object
00654 
00655         o If no valid credentials are passed in the request, return
00656           the Anonymous User.
00657 
00658         o Permission:  Public
00659         """

Here is the caller graph for this function:

Return a sequence local roles assignable by the current user for
    a given object.

o 'obj' is the object to which role assignments may be made.

o Permission:  Public # XXX?

Definition at line 755 of file _tools.py.

00755 
00756     def getCandidateLocalRoles(obj):
00757         """ Return a sequence local roles assignable by the current user for
00758             a given object.
00759 
00760         o 'obj' is the object to which role assignments may be made.
00761 
00762         o Permission:  Public # XXX?
00763         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IMembershipTool.getHomeFolder (   id = None,
  verifyPermission = False 
)
Return a member's home folder object or None.

o 'id', if passed, is the ID of the member whose folder should be
  returned;  if not passed, use the currently-authenticated member.

o If 'verifyPermission' is True, return None when the user
  doesn't have the View permission on the folder.

o Permission:  Public

Definition at line 707 of file _tools.py.

00707 
00708     def getHomeFolder(id=None, verifyPermission=False):
00709         """ Return a member's home folder object or None.
00710 
00711         o 'id', if passed, is the ID of the member whose folder should be
00712           returned;  if not passed, use the currently-authenticated member.
00713 
00714         o If 'verifyPermission' is True, return None when the user
00715           doesn't have the View permission on the folder.
00716 
00717         o Permission:  Public
00718         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IMembershipTool.getHomeUrl (   id = None,
  verifyPermission = 0 
)
Return the URL to a member's home folder or None.

o 'id', if passed, is the ID of the member whose folder should be
  returned;  if not passed, use the currently-authenticated member.

o If 'verifyPermission' is True, return None when the user
  doesn't have the View permission on the folder.

Permission:  Public

Definition at line 719 of file _tools.py.

00719 
00720     def getHomeUrl(id=None, verifyPermission=0):
00721         """ Return the URL to a member's home folder or None.
00722 
00723         o 'id', if passed, is the ID of the member whose folder should be
00724           returned;  if not passed, use the currently-authenticated member.
00725 
00726         o If 'verifyPermission' is True, return None when the user
00727           doesn't have the View permission on the folder.
00728 
00729         Permission:  Public
00730         """

Returns a mapped role name corresponding to 'portal_role', or
    the empty string if no mapping exists.

o Mappings are defined via 'setRoleMapping'.

o Permission:  Manage portal

Definition at line 844 of file _tools.py.

00844 
00845     def getMappedRole(portal_role):
00846         """ Returns a mapped role name corresponding to 'portal_role', or
00847             the empty string if no mapping exists.
00848 
00849         o Mappings are defined via 'setRoleMapping'.
00850 
00851         o Permission:  Manage portal
00852         """

Return True if the membership tool will create a member area for
    a user at login.

o Permission:  Manage portal

Definition at line 853 of file _tools.py.

00853 
00854     def getMemberareaCreationFlag():
00855         """ Return True if the membership tool will create a member area for
00856             a user at login.
00857 
00858         o Permission:  Manage portal
00859         """

Here is the caller graph for this function:

Returns the given IMember.

o Permission:  Manage users

Definition at line 731 of file _tools.py.

00731 
00732     def getMemberById(id):
00733         """ Returns the given IMember.
00734 
00735         o Permission:  Manage users
00736         """

Here is the caller graph for this function:

Return the folderish object which contains membmer folders.

o Return None if no members folder is set or if the specified
  folder doesn't exist.

o Permission:  Public

Definition at line 698 of file _tools.py.

00698 
00699     def getMembersFolder():
00700         """ Return the folderish object which contains membmer folders.
00701 
00702         o Return None if no members folder is set or if the specified
00703           folder doesn't exist.
00704 
00705         o Permission:  Public
00706         """

Here is the caller graph for this function:

Return a sequence of role names defined by the portal itself.

o Returned role names are those understood by the portal object.

o Permission:  Manage portal

Definition at line 829 of file _tools.py.

00829 
00830     def getPortalRoles():
00831         """ Return a sequence of role names defined by the portal itself.
00832 
00833         o Returned role names are those understood by the portal object.
00834 
00835         o Permission:  Manage portal
00836         """

Here is the caller graph for this function:

Return True if no valid credentials are passed in the requeset.

o Permission:  Public

Definition at line 660 of file _tools.py.

00660 
00661     def isAnonymousUser():
00662         """ Return True if no valid credentials are passed in the requeset.
00663 
00664         o Permission:  Public
00665         """

Here is the caller graph for this function:

Return a sequence of ids of all members.

o This may eventually be replaced with a set of methods for querying
  pieces of the list rather than the entire list at once.

o Permission:  Manage users

Definition at line 737 of file _tools.py.

00737 
00738     def listMemberIds():
00739         """ Return a sequence of ids of all members.
00740 
00741         o This may eventually be replaced with a set of methods for querying
00742           pieces of the list rather than the entire list at once.
00743 
00744         o Permission:  Manage users
00745         """

Return a sequence of all IMembers.

o This may eventually be replaced with a set of methods for querying
  pieces of the list rather than the entire list at once.

o Permission:  Manage users

Definition at line 746 of file _tools.py.

00746 
00747     def listMembers():
00748         """ Return a sequence of all IMembers.
00749 
00750         o This may eventually be replaced with a set of methods for querying
00751           pieces of the list rather than the entire list at once.
00752 
00753         o Permission:  Manage users
00754         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IMembershipTool.setLocalRoles (   obj,
  member_ids,
  member_role,
  reindex = True 
)
Assign a local role on an item to one or more members.

o 'obj' is the object on which to assign the role.

o 'member_ids' is a sequence of user IDs to which to assign the role.

o 'member_role' is the name of the role to assign.

o If 'reindex' is True, then reindex the security-related attributes
  of the object and all subobjects.

o Raise Unauthorized if the currently-authenticated member cannot
  assign 'member_role' on 'obj'.

o Permission:  Public # XXX?

Definition at line 764 of file _tools.py.

00764 
00765     def setLocalRoles(obj, member_ids, member_role, reindex=True):
00766         """ Assign a local role on an item to one or more members.
00767 
00768         o 'obj' is the object on which to assign the role.
00769 
00770         o 'member_ids' is a sequence of user IDs to which to assign the role.
00771 
00772         o 'member_role' is the name of the role to assign.
00773 
00774         o If 'reindex' is True, then reindex the security-related attributes
00775           of the object and all subobjects.
00776 
00777         o Raise Unauthorized if the currently-authenticated member cannot
00778           assign 'member_role' on 'obj'.
00779 
00780         o Permission:  Public # XXX?
00781         """

Toggle the policy flag for create a member areas at login.

o XXX:  Toggle is a weak semantic here;  shouldn't we be passing
the value we want the flag to have?

o Permission:  Manage portal

Definition at line 860 of file _tools.py.

00860 
00861     def setMemberareaCreationFlag():
00862         """ Toggle the policy flag for create a member areas at login.
00863 
00864         o XXX:  Toggle is a weak semantic here;  shouldn't we be passing
00865                 the value we want the flag to have?
00866 
00867         o Permission:  Manage portal
00868         """

def CMFCore.interfaces._tools.IMembershipTool.setPassword (   password,
  domains = None 
)
Allow the authenticated member to set his/her own password.

Permission:  Set own password

Definition at line 645 of file _tools.py.

00645 
00646     def setPassword(password, domains=None):
00647         """ Allow the authenticated member to set his/her own password.
00648 
00649         Permission:  Set own password
00650         """

def CMFCore.interfaces._tools.IMembershipTool.setRoleMapping (   portal_role,
  userfolder_role 
)
Register a mapping of a role defined by the portal to a role
    coming from outside user sources.

o Permission:  Manage portal

Definition at line 837 of file _tools.py.

00837 
00838     def setRoleMapping(portal_role, userfolder_role):
00839         """ Register a mapping of a role defined by the portal to a role
00840             coming from outside user sources.
00841 
00842         o Permission:  Manage portal
00843         """


Member Data Documentation

Initial value:
Attribute('id',
            """ The tool's ID.o Must be set to 'portal_membership'.""")
Manage policy of how and where to store and retrieve members and
their member folders.

Definition at line 639 of file _tools.py.


The documentation for this class was generated from the following file: