l.s.w.a.LaunchpadLoginSource : class documentation

Part of lp.services.webapp.authentication View In Hierarchy

A login source that uses the launchpad SQL database to look up principal information.
Method getPrincipal Return an ILaunchpadPrincipal for the account with the given id.
Method getPrincipals Undocumented
Method getPrincipalByLogin Return a principal based on the account with the email address
Method _principalForAccount Return a LaunchpadPrincipal for the given account.
def getPrincipal(self, id, access_level=AccessLevel.WRITE_PRIVATE, scope_url=None):
Return an ILaunchpadPrincipal for the account with the given id.

Return None if there is no account with the given id.

The access_level can be used for further restricting the capability of the principal. By default, no further restriction is added.

Similarly, when a scope_url is given, the principal's capabilities will apply only to things within that scope. For everything else that is not private, the principal will have only read access.

Note that we currently need to be able to retrieve principals for invalid People, as the login machinery needs the principal to validate the password against so it may then email a validation request to the user and inform them it has done so.

def getPrincipals(self, name):
Undocumented
def getPrincipalByLogin(self, login, access_level=AccessLevel.WRITE_PRIVATE, scope_url=None):
Return a principal based on the account with the email address signified by "login".

The access_level can be used for further restricting the capability of the principal. By default, no further restriction is added.

Similarly, when a scope_url is given, the principal's capabilities will apply only to things within that scope. For everything else that is not private, the principal will have only read access.

Note that we currently need to be able to retrieve principals for invalid People, as the login machinery needs the principal to validate the password against so it may then email a validation request to the user and inform them it has done so.

ReturnsNone if there is no account with the given email address.
def _principalForAccount(self, account, access_level, scope_url):
Return a LaunchpadPrincipal for the given account.

The LaunchpadPrincipal will also have the given access level and scope.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.