Package google.registry.model.console
Class UserRoles
java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.console.UserRoles
Contains the global and per-registrar roles for a given user.
See go/nomulus-console-authz for more information.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
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
-
Method Summary
Modifier and TypeMethodDescriptionThe global role (e.g.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
(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
-
Constructor Details
-
UserRoles
public UserRoles()
-
-
Method Details
-
isAdmin
public boolean isAdmin()Whether the user is a global admin, who has access to everything. -
getGlobalRole
The global role (e.g.GlobalRole.SUPPORT_AGENT
) that the user has across all registrars. -
getRegistrarRoles
Any per-registrar roles that this user may have. -
hasPermission
If the user has the given permission either globally or on the given registrar. -
hasGlobalPermission
If the user has the given permission globally across all registrars. -
asBuilder
-