mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Change registrar console login code in preparation for removing requireLogin
We are going to remove the requireLogin attribute from the action attribute, because it is specific to the UserService API. This is used by four actions: ConsoleUIAction RegistrarSettingsAction RegistrarPaymentSetupAction RegistrarPaymentAction Instead, these four actions will now check the login status directly. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=159562335
This commit is contained in:
parent
17697388b8
commit
2b7f78db98
17 changed files with 151 additions and 112 deletions
|
@ -36,11 +36,11 @@ public abstract class AuthResult {
|
|||
return authLevel() != AuthLevel.NONE;
|
||||
}
|
||||
|
||||
static AuthResult create(AuthLevel authLevel) {
|
||||
public static AuthResult create(AuthLevel authLevel) {
|
||||
return new AutoValue_AuthResult(authLevel, Optional.<UserAuthInfo>absent());
|
||||
}
|
||||
|
||||
static AuthResult create(AuthLevel authLevel, @Nullable UserAuthInfo userAuthInfo) {
|
||||
public static AuthResult create(AuthLevel authLevel, @Nullable UserAuthInfo userAuthInfo) {
|
||||
if (authLevel == AuthLevel.USER) {
|
||||
checkNotNull(userAuthInfo);
|
||||
}
|
||||
|
|
|
@ -37,12 +37,12 @@ public abstract class UserAuthInfo {
|
|||
/** Used by the OAuth authentication mechanism (only) to return information about the session. */
|
||||
public abstract Optional<OAuthTokenInfo> oauthTokenInfo();
|
||||
|
||||
static UserAuthInfo create(
|
||||
public static UserAuthInfo create(
|
||||
User user, boolean isUserAdmin) {
|
||||
return new AutoValue_UserAuthInfo(user, isUserAdmin, Optional.<OAuthTokenInfo>absent());
|
||||
}
|
||||
|
||||
static UserAuthInfo create(
|
||||
public static UserAuthInfo create(
|
||||
User user, boolean isUserAdmin, OAuthTokenInfo oauthTokenInfo) {
|
||||
return new AutoValue_UserAuthInfo(user, isUserAdmin, Optional.of(oauthTokenInfo));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue