Part of lp.services.webapp.authentication View In Hierarchy
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. |
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.
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.
Returns | None if there is no account with the given email address. |