Class UserRoles

java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.console.UserRoles
All Implemented Interfaces:
Buildable, 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.

  • Constructor Details

    • UserRoles

      public UserRoles()
  • Method Details

    • 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 Map<String,RegistrarRole> getRegistrarRoles()
      Any per-registrar roles that this user may have.
    • hasPermission

      public boolean hasPermission(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()
      Specified by:
      asBuilder in interface Buildable