Part of canonical.launchpad.browser.logintoken View In Hierarchy
Known subclasses: canonical.launchpad.browser.logintoken.BugTrackerHandshakeView, canonical.launchpad.browser.logintoken.ClaimTeamView, canonical.launchpad.browser.logintoken.MergePeopleView, canonical.launchpad.browser.logintoken.ValidateEmailView, canonical.launchpad.browser.logintoken.ValidateGPGKeyView
Method | next_url | The next URL to redirect to on successful form submission. |
Method | page_title | The page title. |
Method | redirectIfInvalidOrConsumedToken | If this is a consumed or invalid token redirect to the LoginToken |
Method | success | Indicate to the user that the token was successfully processed. |
Method | logInPrincipalByEmail | Login the principal with the given email address. |
Method | accountWasSuspended | Return True if the person's account was SUSPENDED, otherwise False. |
Method | _cancel | Consume the LoginToken and set self._next_url_for_cancel. |
When the cancel action is used, self._next_url_for_cancel won't be None so we return that. Otherwise we return self.default_next_url.
An invalid token is a token used for a purpose it wasn't generated for (i.e. create a new account with a VALIDATEEMAIL token).
This involves adding a notification message, and redirecting the user to their Launchpad page.
_next_url_for_cancel is set to the home page of this LoginToken's requester.
When the account was SUSPENDED, the Warning Notification with the reason is added to the request's response. The LoginToken is consumed.
Parameters | account | The IAccount. |
reason | A sentence that explains why the SUSPENDED account cannot be used. |