Back to index

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

List of all members.

Public Member Functions

def isRegistrationAllowed
def testPasswordValidity
def testPropertiesValidity
def generatePassword
def addMember
def isMemberIdAllowed
def afterAdd
def mailPassword

Static Public Attributes

tuple id

Detailed Description

Manage policies for member registration.

o Depends on IMembershipTool component.

o Is not aware of membership storage details.

Definition at line 1055 of file _tools.py.


Member Function Documentation

def CMFCore.interfaces._tools.IRegistrationTool.addMember (   id,
  password,
  roles = ('Member',,
  domains = '',
  properties = None 
)
Creates and return a new member.

o 'id' is the user ID of the member to be created;  raise ValueError
  if there already exists a member with the given 'id'.

o 'password' is the user's password;  raise ValueError if the
  supplied 'password' does not comply with the site's password policy.

o 'roles' is a list of roles to grant the new member;  raise
  Unauthorized if the currently-authenticated user is not
  allowed to grant one of the roles listed

  - "Member" is a special role that can always be granted

o 'properties', if passed,  is a mapping with additional member
  properties;  raise ValueError if one or more properties do not
  comply with the site's policies.

o Permission:  Add portal member

Definition at line 1110 of file _tools.py.

01110 
01111                   properties=None):
01112         """ Creates and return a new member.
01113 
01114         o 'id' is the user ID of the member to be created;  raise ValueError
01115           if there already exists a member with the given 'id'.
01116 
01117         o 'password' is the user's password;  raise ValueError if the
01118           supplied 'password' does not comply with the site's password policy.
01119 
01120         o 'roles' is a list of roles to grant the new member;  raise
01121           Unauthorized if the currently-authenticated user is not
01122           allowed to grant one of the roles listed
01123 
01124           - "Member" is a special role that can always be granted
01125 
01126         o 'properties', if passed,  is a mapping with additional member
01127           properties;  raise ValueError if one or more properties do not
01128           comply with the site's policies.
01129 
01130         o Permission:  Add portal member
01131         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IRegistrationTool.afterAdd (   member,
  id,
  password,
  properties 
)
Notification called by portal_registration.addMember() after a
    member has been added successfully.

o Permission:  Private (Python only)

Definition at line 1139 of file _tools.py.

01139 
01140     def afterAdd(member, id, password, properties):
01141         """ Notification called by portal_registration.addMember() after a
01142             member has been added successfully.
01143 
01144         o Permission:  Private (Python only)
01145         """

Here is the caller graph for this function:

Return a generated password which is complies with the site's
    password policy.

o Permission:  Public

Definition at line 1102 of file _tools.py.

01102 
01103     def generatePassword():
01104         """ Return a generated password which is complies with the site's
01105             password policy.
01106 
01107         o Permission:  Public
01108         """

Return True if 'id' is not in use as a member ID and is not
    reserved, else False.

o Permission:  Add portal member

Definition at line 1132 of file _tools.py.

01132 
01133     def isMemberIdAllowed(id):
01134         """ Return True if 'id' is not in use as a member ID and is not
01135             reserved, else False.
01136 
01137         o Permission:  Add portal member
01138         """

Here is the caller graph for this function:

Return True if the current user is allowed to add a member to
    the site, else False.

o Permission:  Public

Definition at line 1071 of file _tools.py.

01071 
01072     def isRegistrationAllowed(REQUEST):
01073         """ Return True if the current user is allowed to add a member to
01074             the site, else False.
01075 
01076         o Permission:  Public
01077         """

def CMFCore.interfaces._tools.IRegistrationTool.mailPassword (   forgotten_userid,
  REQUEST 
)
Email a forgotten password to a member.

o Raise ValueError if user ID is not found.

o XXX: should probably *not* raise, in order to prevent cracking.

o Permission:  Mail forgotten password

Definition at line 1146 of file _tools.py.

01146 
01147     def mailPassword(forgotten_userid, REQUEST):
01148         """ Email a forgotten password to a member.
01149 
01150         o Raise ValueError if user ID is not found.
01151 
01152         o XXX: should probably *not* raise, in order to prevent cracking.
01153 
01154         o Permission:  Mail forgotten password
01155         """
01156 
01157 
01158 #
01159 #   Skins tool interfaces
#
def CMFCore.interfaces._tools.IRegistrationTool.testPasswordValidity (   password,
  confirm = None 
)
Return None if the password is valid;  otherwise return a string
    explaining why not.

o 'password' is the candidate password string.

o If 'confirm' is passed, XXX?

o Permission:  Public

Definition at line 1078 of file _tools.py.

01078 
01079     def testPasswordValidity(password, confirm=None):
01080         """ Return None if the password is valid;  otherwise return a string
01081             explaining why not.
01082 
01083         o 'password' is the candidate password string.
01084 
01085         o If 'confirm' is passed, XXX?
01086 
01087         o Permission:  Public
01088         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.IRegistrationTool.testPropertiesValidity (   new_properties,
  member = None 
)
Return None if the supplied properties are valid;  otherwise
    return a string explaining why not.

o 'new_properties' is a mapping containing the properties to test.

o 'member', if passed, is the ID of the member for whome the
  properties are being set;  if not passed, use the currently-
  authenticated member.

o Permission:  Public

Definition at line 1089 of file _tools.py.

01089 
01090     def testPropertiesValidity(new_properties, member=None):
01091         """ Return None if the supplied properties are valid;  otherwise
01092             return a string explaining why not.
01093 
01094         o 'new_properties' is a mapping containing the properties to test.
01095 
01096         o 'member', if passed, is the ID of the member for whome the
01097           properties are being set;  if not passed, use the currently-
01098           authenticated member.
01099 
01100         o Permission:  Public
01101         """

Here is the caller graph for this function:


Member Data Documentation

Initial value:
Attribute('id',
            """ The ID of the tool.o Must be set to "portal_registration"""",
            )
Manage policies for member registration.

o Depends on IMembershipTool component.

o Is not aware of membership storage details.

Definition at line 1064 of file _tools.py.


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