Portal Invite Architecture
The Portal Invite Tool allows portal members to invite new users to register into the portal. The portal administrator assigns invite codes to portal members. These invite codes are used by portal members to send invitations. The invitations could also carry action items for the potential user to act upon once registered.
Some of the fuctionality that Portal Invite tries to achieve is as follows.
a) The Portal administrator introduces potential users into the system either through the Plone Setup interface or by sending them an invitation to start working with the system. The invitation will have a link which is tied down to the email address and the potential users will be asked to choose their user names and passwords.
b) Any potential user who registers into the system automatically becomes a member of the Common Room.
c) The portal admin introduces registered users by inviting them through email. The user's username and access rights may be predefined by the admin and coded into the invitation.
d) Potential user receives invitation as a URL in email. Potential user clicks on link and is taken to a page where she fills in the necessary details. Potential user submits, and the system fills in additional details such as the user's permissions (and sometimes, choice of username) based on the portal admin's invitation.
e) Invitations are time limited. They expire when the time period ends, or when they get used. Invitations may not be used again after expiry.
f) The invite summary page shows status of all invitations, or of invitations sent by the current user.
g) Users may optionally be authorised to invite other users to the system. For example, the portal administrator may send invites to all department heads, and expect that they in turn will invite all members of their department.
h) The potential user clicks on the link in the email and registers him/herself into the system. The user is asked to change or choose his/her password. The user can, if the portal administrator allows for it, have the option of choosing the user name.The instructions for changing password should be included in the invitation mail.
i) Potential user receives invitation as a URL in email. Potential user clicks on link and is taken to a page where she fills in the necessary details. Potential user submits, and the system fills in additional details such as the user's permissions (and sometimes, choice of username) based on the portal admin's invitation.
j) When the user registers and logs in, she's asked if she wants to update her profile. The profile page consists of a fixed set of questions, along with options on what information is available to what user (anonymous, registered users, group member). The profile consists of the following user-editable fields:Name and picture Job profile and work history Contact information Location and languages Other links, external and internal
class PortalInvite(Uniquebbject, Objectmanager, Simpleitem, Actionproviderbase, Propertymanager):
Portal Invite tool, allows users to invite other users. Keeps track of who invited whom. Requires support from the portal join template to ensure that the invite code is necessary (template is included).
- generateInvite(self, sender=None, count=1, userenforce=False,REQUEST=None): - Creates a new invite and assigns it to a sender.
- delInvite(self, invitecode): - Deletes an invite in case it cannot be used for any reason.
- useInvite(self, invitecode, recipient): - Marks an invite code as used by a specific recipient. Does not create the user account. Raises an exception if the invite is unusable. Returns silently otherwise.
- getJoinFormAddress(self, invitecode, email): - Returns the email address of the invite.
- mailInvite(self, variables = {}): - Mails an invite. Behaves similarly to plone_utils.sendto().
- getInviteCode(self, enforce_address=False): - Returns an invide code for the authenticated user.
- getInvitesUser(self, sent=None, used=None, enforce_address=None): Returns invites for the current user matching specifications.
- getInvites(self, user=None, sent=None, used=None, enforce_address=None): Returns invites matching the given specifications.
class InviteToken?(Catalogpathaware, Simpleitem):
An invite token. This class provides no ZMI management interface. All handling is via the portal_invite tool.
- init(self, id, title=, sender=, enforce_address=False):
- use(self, recipient): - Use an invite code. Note that a code is used only when claimed by a recipient. Merely sending an invite to someone does not use it up. The recipient" parameter refers to the login id of the new user.
- expired(self): - Returns true if the object is expired.
- enforce(self): - Marks an invite code as enforced.
- sendTo(self, sent_address): - Mark this invite code as sent to a particular address. This is needed when invites are in limited supply.
