API Documentation

Membership tool interface.

$Id: portal_membership.py,v 1.6.14.2 2004/04/23 21:11:34 sidnei Exp $


class portal_membership

Deals with the details of how and where to store and retrieve members and their member folders.


id = Must be set to "portal_membership"

Methods

createMemberarea(member_id):

create a member area, only used if members are sourced from an independent underlying user folder and not just from the join process

credentialsChanged(password):

Notifies the authentication mechanism that this user has changed passwords. This can be used to update the authentication cookie. Note that this call should not cause any change at all to user databases.

getMemberareaCreationFlag():

Returns the flag indicating whether the membership tool will create a member area if an authenticated user from an underlying user folder logs in first without going through the join process

addMember(id, password, roles, domains):

Adds a new member to the user folder. Security checks will have already been performed. Called by portal_registration.

getHomeFolder(id=None, verifyPermission=0):

Returns a member's home folder object or None. Set verifyPermission to 1 to return None when the user doesn't have the View permission on the folder.

listMemberIds():

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

getPortalRoles():

Return all local roles defined by the portal itself, which means roles that are useful and understood by the portal object

getMappedRole(portal_role):

returns a role name if the portal role is mapped to something else or an empty string if it is not

listMembers():

Gets the list of all members.

getHomeUrl(id=None, verifyPermission=0):

Returns the URL to a member's home folder or None. Set verifyPermission to 1 to return None when the user doesn't have the View permission on the folder.

setMemberareaCreationFlag():

sets the flag indicating whether the membership tool will create a member area if an authenticated user from an underlying user folder logs in first without going through the join process

getMemberById(id):

Returns the given member.

setRoleMapping(portal_role, userfolder_role):

set the mapping of roles between roles understood by the portal and roles coming from outside user sources

isAnonymousUser():

Returns 1 if the user is not logged in.

setPassword(password, domains=None):

Allows the authenticated member to set his/her own password.

Permission
SetOwnPassword

getAuthenticatedMember():

Returns the currently authenticated member object or the Anonymous User.

checkPermission(permissionName, object, subobjectName=None):

Checks whether the current user has the given permission on the given object or subobject.