mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Allow admins read/write access to all registrar in web console
This CL removes the "READ vs UPDATE" feature completely. Now anyone with access has full read+write access. We still keep track of which role a user has (did they get access "explicitly" because they are an "allowed access" contact? Or do they have access because they are admins?) for the logs and UI, and also so we could in the (very near) future have features only available to admins. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=218169608
This commit is contained in:
parent
2020dcb50f
commit
d2ca67460c
12 changed files with 138 additions and 288 deletions
|
@ -15,7 +15,7 @@
|
|||
package google.registry.rdap;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import google.registry.model.ImmutableObject;
|
||||
|
||||
/** Authorization information for RDAP data access. */
|
||||
|
@ -32,13 +32,13 @@ public abstract class RdapAuthorization extends ImmutableObject {
|
|||
public abstract Role role();
|
||||
|
||||
/** The registrar client IDs for which access is granted (used only if the role is REGISTRAR. */
|
||||
public abstract ImmutableList<String> clientIds();
|
||||
public abstract ImmutableSet<String> clientIds();
|
||||
|
||||
static RdapAuthorization create(Role role, String clientId) {
|
||||
return new AutoValue_RdapAuthorization(role, ImmutableList.of(clientId));
|
||||
return new AutoValue_RdapAuthorization(role, ImmutableSet.of(clientId));
|
||||
}
|
||||
|
||||
static RdapAuthorization create(Role role, ImmutableList<String> clientIds) {
|
||||
static RdapAuthorization create(Role role, ImmutableSet<String> clientIds) {
|
||||
return new AutoValue_RdapAuthorization(role, clientIds);
|
||||
}
|
||||
|
||||
|
@ -54,9 +54,8 @@ public abstract class RdapAuthorization extends ImmutableObject {
|
|||
}
|
||||
|
||||
public static final RdapAuthorization PUBLIC_AUTHORIZATION =
|
||||
create(Role.PUBLIC, ImmutableList.of());
|
||||
create(Role.PUBLIC, ImmutableSet.of());
|
||||
|
||||
public static final RdapAuthorization ADMINISTRATOR_AUTHORIZATION =
|
||||
create(Role.ADMINISTRATOR, ImmutableList.of());
|
||||
create(Role.ADMINISTRATOR, ImmutableSet.of());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue