Package google.registry.model.console
Class UserRoles
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.console.UserRoles
-
- All Implemented Interfaces:
Buildable
,java.lang.Cloneable
@Embeddable public class UserRoles extends ImmutableObject implements Buildable
Contains the global and per-registrar roles for a given user.See go/nomulus-console-authz for more information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserRoles.Builder
Builder for constructing immutableUserRoles
objects.-
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Nested classes/interfaces inherited from interface google.registry.model.Buildable
Buildable.GenericBuilder<S,B extends Buildable.GenericBuilder<?,?>>, Buildable.Overlayable<T>
-
-
Field Summary
-
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
-
Constructor Summary
Constructors Constructor Description UserRoles()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserRoles.Builder
asBuilder()
GlobalRole
getGlobalRole()
The global role (e.g.java.util.Map<java.lang.String,RegistrarRole>
getRegistrarRoles()
Any per-registrar roles that this user may have.boolean
hasGlobalPermission(ConsolePermission permission)
If the user has the given permission globally across all registrars.boolean
hasPermission(java.lang.String registrarId, ConsolePermission permission)
If the user has the given permission either globally or on the given registrar.boolean
isAdmin()
Whether the user is a global admin, who has access to everything.-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Method Detail
-
isAdmin
public boolean isAdmin()
Whether the user is a global admin, who has access to everything.
-
getGlobalRole
public GlobalRole getGlobalRole()
The global role (e.g.GlobalRole.SUPPORT_AGENT
) that the user has across all registrars.
-
getRegistrarRoles
public java.util.Map<java.lang.String,RegistrarRole> getRegistrarRoles()
Any per-registrar roles that this user may have.
-
hasPermission
public boolean hasPermission(java.lang.String registrarId, ConsolePermission permission)
If the user has the given permission either globally or on the given registrar.
-
hasGlobalPermission
public boolean hasGlobalPermission(ConsolePermission permission)
If the user has the given permission globally across all registrars.
-
asBuilder
public UserRoles.Builder asBuilder()
-
-