l.r.i.p.IPersonViewRestricted(IHasBranches, IHasSpecifications, IHasMergeProposals, IHasMugshot, IHasLocation, IHasRequestedReviews, IObjectWithLocation, IHasBugs, IHasRecipes, IHasTranslationImports, IPersonSettingsViewRestricted, IQuestionsPerson, IHasGitRepositories) : interface documentation

Part of lp.registry.interfaces.person View In Hierarchy

Known subclasses: lp.registry.interfaces.webservice.IPerson

IPerson attributes that require launchpad.View permission.
Object account Undocumented
Int accountID Undocumented
Int mugshotID Undocumented
Choice creation_rationale Undocumented
TextLine creation_comment This comment may be displayed verbatim in a web page, so it has to follow some structural constraints, that is, it must be of the form: 'when %(action_details)s' (e.g 'when the foo package was imported into Ubuntu Breezy'). The only exception to this is when we allow users to create Launchpad profiles through the /people/+newperson page.
Attribute registrant The user who created this profile.
Attribute oauth_access_tokens Non-expired access tokens
Attribute oauth_request_tokens Non-expired request tokens
Attribute karma_category_caches The caches of karma scores, by karma category.
Attribute activesignatures Retrieve own Active CoC Signatures.
Attribute inactivesignatures Retrieve own Inactive CoC Signatures.
Attribute signedcocs List of Signed Code Of Conduct
Attribute inactive_gpg_keys List of inactive OpenPGP keys in LP Context, ordered by ID
Attribute teams_with_icons Iterable of all Teams that this person is active in that have icons
Attribute guessedemails List of emails with status NEW. These email addresses probably came from a gina or POFileImporter run.
Attribute unvalidatedemails Emails this person added in Launchpad but are not yet validated.
Attribute specifications Any specifications related to this person, either because the are a subscriber, or an assignee, or a drafter, or the creator. Sorted newest-first.
Method findVisibleAssignedInProgressSpecs List specifications in progress assigned to this person.
Int teamownerID Undocumented
TextLine safe_email_or_blank The person's preferred email if they haveone and do not choose to hide it. Otherwisethe empty string.
Bool verbose_bugnotifications Undocumented
Int merged When a Person is merged into another Person, this attribute is set on the Person referencing the destination Person. If this is set to None, then this Person has not been merged into another and is still valid
Attribute structural_subscriptions The structural subscriptions for this person.
Attribute visibilityConsistencyWarning Warning that a private team may leak membership info.
Attribute administrated_teams Undocumented
Method personCannotHaveIcon Only Persons can have icons.
Method convertToTeam Convert this person into a team owned by the given team_owner.
Method createRecipe Create a SourcePackageRecipe owned by this person.
Method getRecipe Return the person's recipe with the given name.
Method getArchiveSubscriptions Return (private) archives subscription for this person.
Method getArchiveSubscriptionURLs Return private archive URLs that this person can see.
Method getArchiveSubscriptionURL Get a text line that is suitable to be used for a sources.list
Method getVisiblePPAs Return active PPAs for which user has launchpad.View permission.
Method getInvitedMemberships Return all TeamMemberships of this team with the INVITED status.
Method getInactiveMemberships Return all inactive TeamMemberships of this team.
Method getProposedMemberships Return all TeamMemberships of this team with the PROPOSED status.
Method getBugSubscriberPackages Return the packages for which this person is a bug subscriber.
Method setContactAddress Set the given email address as this team's contact address.
Method setPreferredEmail Set the given email address as this person's preferred one.
Method findPathToTeam Return the teams providing membership to the given team.
Attribute mailing_list The team's mailing list, if it has one, otherwise None.
Method getProjectsAndCategoriesContributedTo Return a list of dicts with projects and the contributions made
Method getAffiliatedPillars Return the pillars that this person directly has a role with.
Method getOwnedProjects Projects owned by this person or teams to which they belong.
Method isAnyPillarOwner Is this person the owner of any pillar?
Method getAllCommercialSubscriptionVouchers Return all commercial subscription vouchers.
Method getRedeemableCommercialSubscriptionVouchers Return the set of redeemable vouchers.
Method hasCurrentCommercialSubscription Return if the user has a current commercial subscription.
Method assignKarma Assign karma for the action named <action_name> to this person.
Method latestKarma Return the latest karma actions for this person.
Method inTeam Is this person is a member of team?
Method clearInTeamCache Clears the person's inTeam cache.
Method getLatestSynchronisedPublishings Return `SourcePackagePublishingHistory`s synchronised by this
Method getLatestMaintainedPackages Return `SourcePackageRelease`s maintained by this person.
Method getLatestUploadedButNotMaintainedPackages Return `SourcePackageRelease`s created by this person but
Method getLatestUploadedPPAPackages Return `SourcePackageRelease`s uploaded by this person to any PPA.
Method hasSynchronisedPublishings Are there `SourcePackagePublishingHistory`s synchronised by this
Method hasMaintainedPackages Are there `SourcePackageRelease`s maintained by this person.
Method hasUploadedButNotMaintainedPackages Are there `SourcePackageRelease`s created by this person but
Method hasUploadedPPAPackages Are there `SourcePackageRelease`s uploaded by this person to any
Method validateAndEnsurePreferredEmail Ensure this person has a preferred email.
Method hasParticipationEntryFor Return True when this person is a member of the given team.
Method getOwnedTeams Return the teams that this person owns.
Method getAdministratedTeams Return the teams that this person/team is an administrator of.
Method getTeamAdminsEmailAddresses Return a set containing the email addresses of all administrators
Method getLatestApprovedMembershipsForPerson Return the <limit> latest approved membrships for this person.
Method getPathsToTeams Return the paths to all teams related to this person.
Method addLanguage Add a language to this person's preferences.
Method removeLanguage Remove a language from this person's preferences.
Method isBugContributor Is the person a contributer to bugs in Launchpad?
Method isBugContributorInTarget Is the person a contributor to bugs in target?
Method autoSubscribeToMailingList Subscribe this person to a mailing list.
Method checkRename Check if a person or team can be renamed.
Method canCreatePPA Check if a person or team can create a PPA.
Method getAssignedSpecificationWorkItemsDueBefore Return SpecificationWorkItems assigned to this person (or members
Method getAssignedBugTasksDueBefore Get all BugTasks assigned to this person (or members of this team)
List participant_ids Undocumented
Attribute active_member_count The number of real people who are members of this team.
Attribute activemembers List of direct members with ADMIN or APPROVED status
Attribute adminmembers List of this team's admins.
Attribute all_member_count The total number of real people who are members of this team, including subteams.
Attribute deactivated_member_count Number of deactivated members
Attribute deactivatedmembers Former members of the team.
Attribute expired_member_count Number of EXPIRED members.
Attribute expiredmembers Expired members of the team.
Attribute inactive_member_count Number of inactive members
Attribute invited_members Other teams which have been invited to become members of this team.
Attribute invited_member_count Number of members with INVITED status
Attribute proposedmembers People who have applied to join the team.
Attribute proposed_member_count Number of PROPOSED members
Method getMembersWithPreferredEmails Returns a result set of persons with precached addresses.
Method getMembersWithPreferredEmailsCount Returns the count of persons/teams with preferred emails.
Method getDirectAdministrators Return this team's administrators.
Method getMembersByStatus Return the people whose membership on this team match :status:.

Inherited from IHasBranches:

Method getBranches Returns all branches with the given lifecycle status.

Inherited from IHasSpecifications:

Method valid_specifications Valid specifications for this target.

Inherited from IHasMergeProposals:

Method getMergeProposals Returns all merge proposals of a given status.

Inherited from IHasMugshot:

Attribute mugshot The 192x192 mugshot.

Inherited from IHasRequestedReviews:

Method getRequestedReviews Returns merge proposals where a person was asked to review.
Method getOwnedAndRequestedReviews Returns merge proposals for branches owned by a person, or where

Inherited from IObjectWithLocation:

Attribute location An ILocation for this object.

Inherited from IHasBugs:

Method searchTasks Search the IBugTasks reported on this entity.
Method getBugTaskWeightFunction Return a function that is used to weight the bug tasks.

Inherited from IHasTranslationImports:

Method getFirstEntryToImport Return the first entry of the queue ready to be imported.
Method getTranslationImportQueueEntries Return entries in the translation import queue for this entity.

Inherited from IPersonSettingsViewRestricted:

Bool selfgenerated_bugnotifications Undocumented
Bool expanded_notification_footers Some email clients do not allow filtering on arbitrary message headers. If you use one of these, you can set this option to add more information to the end of message bodies.

Inherited from IQuestionsPerson:

Method getDirectAnswerQuestionTargets Return a list of IQuestionTargets that a person is subscribed to.
Method getTeamAnswerQuestionTargets Return a list of IQuestionTargets that are indirect subscriptions.
Method searchQuestions Search the person's questions.

Inherited from IQuestionCollection (via IQuestionsPerson):

Method getQuestionLanguages Return the set of ILanguage used by all the questions in the
account =
Undocumented
accountID =
Undocumented
mugshotID =
Undocumented
creation_rationale =
Undocumented
creation_comment =
This comment may be displayed verbatim in a web page, so it has to follow some structural constraints, that is, it must be of the form: 'when %(action_details)s' (e.g 'when the foo package was imported into Ubuntu Breezy'). The only exception to this is when we allow users to create Launchpad profiles through the /people/+newperson page.
registrant =
The user who created this profile.
oauth_access_tokens =
Non-expired access tokens
oauth_request_tokens =
Non-expired request tokens
karma_category_caches =
The caches of karma scores, by karma category.
activesignatures =
Retrieve own Active CoC Signatures.
inactivesignatures =
Retrieve own Inactive CoC Signatures.
signedcocs =
List of Signed Code Of Conduct
inactive_gpg_keys =
List of inactive OpenPGP keys in LP Context, ordered by ID
teams_with_icons =
Iterable of all Teams that this person is active in that have icons
guessedemails =
List of emails with status NEW. These email addresses probably came from a gina or POFileImporter run.
unvalidatedemails =
Emails this person added in Launchpad but are not yet validated.
specifications =
Any specifications related to this person, either because the are a subscriber, or an assignee, or a drafter, or the creator. Sorted newest-first.
def findVisibleAssignedInProgressSpecs(user):
List specifications in progress assigned to this person.

In progress means their implementation is started but not yet completed. They are sorted newest first. No more than 5 specifications are returned.

ParametersuserThe use to use for determining visibility.
teamownerID =
Undocumented
safe_email_or_blank =
The person's preferred email if they haveone and do not choose to hide it. Otherwisethe empty string.
verbose_bugnotifications =
Undocumented
merged =
When a Person is merged into another Person, this attribute is set on the Person referencing the destination Person. If this is set to None, then this Person has not been merged into another and is still valid
structural_subscriptions =
The structural subscriptions for this person.
visibilityConsistencyWarning =
Warning that a private team may leak membership info.
administrated_teams =
Undocumented
@invariant
def personCannotHaveIcon(person):
Only Persons can have icons.
def convertToTeam(team_owner):
Convert this person into a team owned by the given team_owner.

Also adds the given team owner as an administrator of the team.

Only Person entries whose account_status is NOACCOUNT and which are not teams can be converted into teams.

@call_with(REQUEST_USER)
@operation_parameters(Text(), List(Reference(Interface)), TextLine(), Text(), Reference(Interface), Bool())
@export_factory_operation(Interface, )
@operation_for_version('beta')
def createRecipe(name, description, recipe_text, distroseries, registrant, daily_build_archive=None, build_daily=False):
Create a SourcePackageRecipe owned by this person.
Parametersnamethe name to use for referring to the recipe.
descriptionA description of the recipe.
recipe_textThe text of the recipe.
distroseriesThe distroseries to use.
registrantThe person who created this recipe.
daily_build_archiveThe archive to use for daily builds.
build_dailyIf True, build this recipe daily (if changed).
Returnsa SourcePackageRecipe.
@operation_parameters(TextLine(True))
@operation_returns_entry(Interface)
@export_read_operation()
@operation_for_version('beta')
def getRecipe(name):
Return the person's recipe with the given name.
@call_with(REQUEST_USER)
@export_read_operation()
@operation_returns_collection_of(Interface)
@operation_for_version('devel')
def getArchiveSubscriptions(requester):
Return (private) archives subscription for this person.
@call_with(REQUEST_USER)
@export_read_operation()
@operation_for_version('beta')
def getArchiveSubscriptionURLs(requester):
Return private archive URLs that this person can see.

For each of the private archives (PPAs) that this person can see, return a URL that includes the HTTP basic auth data. The URL returned is suitable for including in a sources.list file.

@call_with(REQUEST_USER)
@operation_parameters(Reference(Interface))
@export_write_operation()
@operation_for_version('beta')
def getArchiveSubscriptionURL(requester, archive):
Get a text line that is suitable to be used for a sources.list entry.

It will create a new IArchiveAuthToken if one doesn't already exist.

It raises Unauthorized if the context user does not have a valid subscription for the target archive or the caller is not context user itself.

def getVisiblePPAs(user):
Return active PPAs for which user has launchpad.View permission.
def getInvitedMemberships():
Return all TeamMemberships of this team with the INVITED status.

The results are ordered using Person.sortingColumns.

def getInactiveMemberships():
Return all inactive TeamMemberships of this team.

Inactive memberships are the ones with status EXPIRED or DEACTIVATED.

The results are ordered using Person.sortingColumns.

def getProposedMemberships():
Return all TeamMemberships of this team with the PROPOSED status.

The results are ordered using Person.sortingColumns.

@operation_returns_collection_of(Interface)
@export_read_operation()
@operation_for_version('beta')
def getBugSubscriberPackages():
Return the packages for which this person is a bug subscriber.

Returns a list of IDistributionSourcePackage's, ordered alphabetically (A to Z) by name.

def setContactAddress(email):
Set the given email address as this team's contact address.

This method must be used only for teams, unless the disable argument is True.

If the team has a contact address its status will be changed to VALIDATED.

If the given email is None the team is left without a contact address.

def setPreferredEmail(email):
Set the given email address as this person's preferred one.

If email is None, the preferred email address is unset, which will make the person invalid.

This method must be used only for people, not teams.

def findPathToTeam(team):
Return the teams providing membership to the given team.

If there is more than one path leading this person to the given team, only the one with the oldest teams is returned.

This method must not be called if this person is not an indirect member of the given team.

mailing_list =
The team's mailing list, if it has one, otherwise None.
def getProjectsAndCategoriesContributedTo(user, limit=10):

Return a list of dicts with projects and the contributions made by this person on that project.

Only entries visible to the specified user will be shown.

The list is limited to the :limit: projects this person is most active.

The dictionaries containing the following keys:
  • project: The project, which is either an IProduct or an

    IDistribution.

  • categories: A dictionary mapping KarmaCategory titles to

    the icons which represent that category.

def getAffiliatedPillars(user):
Return the pillars that this person directly has a role with.

Returns distributions, project groups, and projects that this person maintains, drives, or is the bug supervisor for.

@call_with(REQUEST_USER)
@operation_returns_collection_of(Interface)
@export_read_operation()
@operation_for_version('devel')
def getOwnedProjects(match_name=None, transitive=False, user=None):
Projects owned by this person or teams to which they belong.
Parametersmatch_namestring optional project name to screen the results.
def isAnyPillarOwner():
Is this person the owner of any pillar?
def getAllCommercialSubscriptionVouchers(voucher_proxy=None):
Return all commercial subscription vouchers.

All of a `Person`s vouchers are returned, regardless of redemption
status.  Even vouchers marked inactive are returned.
The result is a dictionary, indexed by the three
voucher statuses.
:return: dict
def getRedeemableCommercialSubscriptionVouchers(voucher_proxy=None):
Return the set of redeemable vouchers.

The `Person`s vouchers are returned if they are unredeemed and active.

The result is a list of vouchers.
:return: list
def hasCurrentCommercialSubscription():
Return if the user has a current commercial subscription.
def assignKarma(action_name, product=None, distribution=None, sourcepackagename=None, datecreated=None):
Assign karma for the action named <action_name> to this person.

This karma will be associated with the given product or distribution. If a distribution is given, then product must be None and an optional sourcepackagename may also be given. If a product is given, then distribution and sourcepackagename must be None.

If a datecreated is specified, the karma will be created with that date. This is how historic karma events can be created.

def latestKarma(quantity=25):
Return the latest karma actions for this person.

Return no more than the number given as quantity.

def inTeam(team):
Is this person is a member of team?

Returns True when you ask if an IPerson (or an ITeam, since it inherits from IPerson) is a member of themselves (i.e. person1.inTeam(person1)).

ParametersteamEither an object providing IPerson, the string name of a team or None. If a string was supplied the team is looked up.
ReturnsA bool with the result of the membership lookup. When looking up the team from a string finds nothing or team was None then False is returned.
def clearInTeamCache():
Clears the person's inTeam cache.

To be used when membership changes are enacted. Only meant to be used between TeamMembership and Person objects.

def getLatestSynchronisedPublishings():
Return `SourcePackagePublishingHistory`s synchronised by this
person.

This method will only include the latest publishings for each source
package name, distribution series combination.
def getLatestMaintainedPackages():
Return `SourcePackageRelease`s maintained by this person.

This method will only include the latest source package release
for each source package name, distribution series combination.
def getLatestUploadedButNotMaintainedPackages():
Return `SourcePackageRelease`s created by this person but
not maintained by them.

This method will only include the latest source package release
for each source package name, distribution series combination.
def getLatestUploadedPPAPackages():
Return `SourcePackageRelease`s uploaded by this person to any PPA.

This method will only include the latest source package release
for each source package name, distribution series combination.
def hasSynchronisedPublishings():
Are there `SourcePackagePublishingHistory`s synchronised by this
person.
def hasMaintainedPackages():
Are there `SourcePackageRelease`s maintained by this person.
def hasUploadedButNotMaintainedPackages():
Are there `SourcePackageRelease`s created by this person but
not maintained by them.
def hasUploadedPPAPackages():
Are there `SourcePackageRelease`s uploaded by this person to any
PPA.
def validateAndEnsurePreferredEmail(email):
Ensure this person has a preferred email.

If this person doesn't have a preferred email, <email> will be set as this person's preferred one. Otherwise it'll be set as VALIDATED and this person will keep their old preferred email.

This method is meant to be the only one to change the status of an email address, but as we all know the real world is far from ideal and we have to deal with this in one more place, which is the case when people explicitly want to change their preferred email address. On that case, though, all we have to do is use person.setPreferredEmail().

def hasParticipationEntryFor(team):
Return True when this person is a member of the given team.

The person's membership may be direct or indirect.

@call_with(REQUEST_USER)
@operation_returns_collection_of(Interface)
@export_read_operation()
@operation_for_version('devel')
def getOwnedTeams(user=None):
Return the teams that this person owns.

The iterator includes the teams that the user owns, but it not a member of.

def getAdministratedTeams():
Return the teams that this person/team is an administrator of.

This includes teams for which the person is the owner, a direct member with admin privilege, or member of a team with such privileges. It excludes teams which have been merged.

def getTeamAdminsEmailAddresses():
Return a set containing the email addresses of all administrators of this team.

If the team has no administrators, fall back to the team owner. This shouldn't normally happen, but a team can end up in this state after deactivations, and there's no good way to prevent it entirely.

def getLatestApprovedMembershipsForPerson(limit=5):
Return the <limit> latest approved membrships for this person.
def getPathsToTeams():
Return the paths to all teams related to this person.
@operation_parameters(Reference(ILanguage))
@export_write_operation()
@operation_for_version('devel')
def addLanguage(language):
Add a language to this person's preferences.

If the given language is one of the user's preferred languages already, nothing will happen.

ParameterslanguageAn object providing ILanguage.
@operation_parameters(Reference(ILanguage))
@export_write_operation()
@operation_for_version('devel')
def removeLanguage(language):
Remove a language from this person's preferences.

If the given language is not present, nothing will happen.

ParameterslanguageAn object providing ILanguage.
def isBugContributor(user):
Is the person a contributer to bugs in Launchpad?

Return True if the user has any bugs assigned to them, either
directly or by team participation.

:user: The user doing the search. Private bugs that this
user doesn't have access to won't be included in the
count.
def isBugContributorInTarget(user, target):
Is the person a contributor to bugs in `target`?

Return True if the user has any bugs assigned to them in the
context of a specific target, either directly or by team
participation.

:user: The user doing the search. Private bugs that this
user doesn't have access to won't be included in the
count.

:target: An object providing `IBugTarget` to search within.
def autoSubscribeToMailingList(mailinglist, requester=None):
Subscribe this person to a mailing list.

This method takes the user's mailing list auto-subscription setting into account, and it may or may not result in a list subscription. It will only subscribe the user to the mailing list if all of the following conditions are met:

  • The mailing list is not None.
  • The mailing list is in an unusable state.
  • The user is not already subscribed.
  • The user has a preferred address set.
  • The user's auto-subscribe preference is ALWAYS, or
  • The user's auto-subscribe preference is ON_REGISTRATION, and the requester is either themself or None.

This method will not raise exceptions if any of the above are not true. If you want these problems to raise exceptions consider using IMailinglist.subscribe() directly.

ParametersmailinglistThe list to subscribe to. No action is taken if the list is None, or in an unusable state.
requesterThe person requesting the list subscription, if not the user themselves. The default assumes the user themself is making the request.
ReturnsTrue if the user was subscribed, false if they weren't.
def checkRename():
Check if a person or team can be renamed.

:return: a text string of the reason, or None if the rename is
allowed.
def canCreatePPA():
Check if a person or team can create a PPA.
Returnsa boolean.
def getAssignedSpecificationWorkItemsDueBefore(date, user):
Return SpecificationWorkItems assigned to this person (or members of this team) and whose milestone is due between today and the given date (inclusive).

user specifies the user who is viewing the list; items they cannot see are filtered out. None indicates the anonymous user who can only see public items.

def getAssignedBugTasksDueBefore(date, user):
Get all BugTasks assigned to this person (or members of this team) and whose milestone is due between today and the given date (inclusive).
participant_ids =
Undocumented
active_member_count =
The number of real people who are members of this team.
activemembers =
List of direct members with ADMIN or APPROVED status
adminmembers =
List of this team's admins.
all_member_count =
The total number of real people who are members of this team, including subteams.
deactivated_member_count =
Number of deactivated members
deactivatedmembers =
Former members of the team.
expired_member_count =
Number of EXPIRED members.
expiredmembers =
Expired members of the team.
inactive_member_count =
Number of inactive members
invited_members =
Other teams which have been invited to become members of this team.
invited_member_count =
Number of members with INVITED status
proposedmembers =
People who have applied to join the team.
proposed_member_count =
Number of PROPOSED members
def getMembersWithPreferredEmails():
Returns a result set of persons with precached addresses.

Persons or teams without preferred email addresses are not included.

def getMembersWithPreferredEmailsCount():
Returns the count of persons/teams with preferred emails.

See also getMembersWithPreferredEmails.

def getDirectAdministrators():
Return this team's administrators.

This includes all direct members with admin rights and also the team owner. Note that some other persons/teams might have admin privilege by virtue of being a member of a team with admin rights.

@operation_parameters(copy_field(ITeamMembership['status']))
@operation_returns_collection_of(Interface)
@export_read_operation()
@operation_for_version('beta')
def getMembersByStatus(status, orderby=None):
Return the people whose membership on this team match :status:.

If no orderby is provided, Person.sortingColumns is used.

API Documentation for Launchpad, generated by pydoctor at 2019-04-21 00:00:04.