l.r.i.person : module documentation

Part of lp.registry.interfaces

Person interfaces.
Function validate_person_common Validate the person using the supplied function.
Function validate_person Validate the person is a real person with no other restrictions.
Function validate_public_person Validate that the person identified by value is public.
Function validate_person_or_closed_team Undocumented
Function validate_membership_policy Validate the team membership_policy.
Class PersonalStanding A person's standing.
Class PersonCreationRationale The rationale for the creation of a given person.
Class PersonNameField A Person team name, which is unique and performs psuedo blacklisting.
Function team_membership_policy_can_transition Can the team can change its membership policy?
Class TeamMembershipPolicyChoice A valid team membership policy.
Interface IPersonClaim The schema used by IPerson's +claim form.
Interface IHasStanding An object that can have personal standing.
Interface IPersonSettingsViewRestricted Settings for a person (not a team!) that are used relatively rarely.
Interface IPersonSettingsModerate Settings for a person (not a team!) that are used relatively rarely.
Interface IPersonPublic Public attributes for a Person.
Interface IPersonLimitedView IPerson attributes that require launchpad.LimitedView permission.
Interface IPersonViewRestricted IPerson attributes that require launchpad.View permission.
Interface IPersonEditRestricted IPerson attributes that require launchpad.Edit permission.
Interface IPersonSpecialRestricted IPerson methods that require launchpad.Special permission to use.
Interface IPersonModerate IPerson attributes that the user can see and moderators can change.
Interface IPersonModerateRestricted IPerson attributes that require launchpad.Moderate permission.
Interface IPersonSettings A person's settings.
Interface ITeamPublic Public attributes of a Team.
Interface IRequestPeopleMerge This schema is used only because we want a very specific vocabulary.
Interface IAdminPeopleMergeSchema The schema used by the admin merge people page.
Interface IAdminTeamMergeSchema The schema used by the admin merge teams page.
Interface IObjectReassignment The schema used by the object reassignment page.
Interface ITeamReassignment The schema used by the team reassignment page.
Class TeamContactMethod The method used by Launchpad to contact a given team.
Interface ITeamContactAddressForm Undocumented
Interface ICanonicalSSOApplication XMLRPC application root for ICanonicalSSOAPI.
Interface ICanonicalSSOAPI XMLRPC API used by Canonical SSO.
Class ImmutableVisibilityError A change in team membership visibility is not allowed.
Class NoAccountError The person has no account.
Class NoSuchPerson Raised when we try to look up an IPerson that doesn't exist.
Class TeamEmailAddressError The person cannot be created as a team owns its email address.
@block_implicit_flushes
def validate_person_common(obj, attr, value, validate_func, error_class=PrivatePersonLinkageError):
Validate the person using the supplied function.
def validate_person(obj, attr, value):
Validate the person is a real person with no other restrictions.
def validate_public_person(obj, attr, value):
Validate that the person identified by value is public.
def validate_person_or_closed_team(obj, attr, value):
Undocumented
def validate_membership_policy(obj, attr, value):
Validate the team membership_policy.
def team_membership_policy_can_transition(team, policy):
Can the team can change its membership policy?

Returns True when the policy can change. or raises an error. OPEN teams cannot be members of MODERATED or RESTRICTED teams. OPEN teams cannot have PPAs. Changes from between OPEN and the two closed states can be blocked by team membership and team artifacts.

We only perform the check if a membership policy is transitioning from open->closed or visa versa. So if a team already has a closed subscription policy, it is always allowed to transition to another closed policy.

ParametersteamThe team to change.
policyThe TeamMembershipPolicy to change to.
RaisesTeamMembershipPolicyErrorRaised when a membership constrain or a team artifact prevents the policy from being set.
API Documentation for Launchpad, generated by pydoctor at 2018-08-14 00:00:04.