Part of lp.registry.interfaces.webservice View In Hierarchy
This table includes direct team members only. Indirect memberships are handled by the TeamParticipation table.
Int | id | Undocumented |
Int | personID | Undocumented |
Attribute | proposed_by | Proponent |
Attribute | reviewed_by | The team admin who approved/rejected the member. |
Attribute | acknowledged_by | The person (usually the member or someone acting on their behalf) that acknowledged (accepted/declined) a membership invitation. |
Datetime | date_created | The date in which this membership was created. |
Datetime | date_proposed | The date in which this membership was proposed. |
Datetime | date_acknowledged | The date in which this membership was acknowledged by the member (or someone acting on their behalf). |
Datetime | date_reviewed | The date in which this membership was approved/rejected by one of the team's admins. |
Datetime | date_last_changed | The date in which this membership was last changed. |
Text | proponent_comment | Undocumented |
Text | acknowledger_comment | Undocumented |
Text | reviewer_comment | Undocumented |
Method | isExpired | Return True if this membership's status is EXPIRED. |
Method | canChangeExpirationDate | Can the given person change this membership's expiration date? |
Method | setExpirationDate | Set this membership's expiration date. |
Method | canBeRenewedByMember | Can this membership be renewed by the member themselves? |
Method | sendSelfRenewalNotification | Send an email to the team admins notifying that this membership |
Method | sendExpirationWarningEmail | Send the member an email warning that the membership will expire. |
Method | setStatus | Set the status of this membership. |
A membership's expiration date can be changed by the team owner, by a Launchpad admin or by a team admin. In the latter case, though, the expiration date can only be changed if the admin is not changing their own membership.
The given date must be None or in the future and the given user must be allowed to change this membership's expiration date as per the rules defined in canChangeExpirationDate().
A membership can be renewed if the team's renewal policy is ONDEMAND, the membership itself is active (status = [ADMIN|APPROVED]) and it's set to expire in less than DAYS_BEFORE_EXPIRATION_WARNING_IS_SENT days.
This method must not be called if the team's renewal policy is not ONDEMAND.
This method cannot be called for memberships without an expiration date. Emails are not sent to members if their membership has already expired or if the member is no longer active.
Raises | AssertionError | if the member has no expiration date of the team or if the TeamMembershipRenewalPolicy is AUTOMATIC. |
The user and comment are stored in last_changed_by and last_change_comment and may also be stored in proposed_by (and proponent_comment), reviewed_by (and reviewer_comment) or acknowledged_by (and acknowledger_comment), depending on the state transition.
The given status must be different than the current status.
Return True if the status got changed, otherwise False.