Class IrisUserContext

java.lang.Object
com.illumon.iris.controller.IrisUserContext
All Implemented Interfaces:
IrisGroupProvider

public class IrisUserContext extends Object implements IrisGroupProvider
A super simple dummy implementation of a user context, where you just assert what the user is, and then there are some hardcoded rules for testing.
  • Constructor Details

    • IrisUserContext

      public IrisUserContext(@NotNull io.deephaven.enterprise.auth.UserContext userContext, @NotNull IrisGroupProvider wrappedProvider)
  • Method Details

    • refreshGroups

      public void refreshGroups()
    • getUserContext

      @NotNull public io.deephaven.enterprise.auth.UserContext getUserContext()
    • isSuperUser

      public boolean isSuperUser()
    • isAclEditor

      public boolean isAclEditor()
    • isSchemaManager

      public boolean isSchemaManager()
    • isQueryManager

      public boolean isQueryManager()
    • getUserType

      public IrisGroupProvider.UserType getUserType()
    • isMember

      public final boolean isMember(String owner, String[] groups)
    • isMember

      public final boolean isMember(io.deephaven.enterprise.auth.UserContext userContext, String owner, String[] groups)
      Specified by:
      isMember in interface IrisGroupProvider
    • getGroupsForUser

      public String[] getGroupsForUser()
    • getGroupsForUser

      public String[] getGroupsForUser(io.deephaven.enterprise.auth.UserContext userContext)
      Specified by:
      getGroupsForUser in interface IrisGroupProvider
    • getUsersForGroup

      public String[] getUsersForGroup(String group)
      Specified by:
      getUsersForGroup in interface IrisGroupProvider
    • isSuperUser

      public boolean isSuperUser(io.deephaven.enterprise.auth.UserContext userContext)
      Specified by:
      isSuperUser in interface IrisGroupProvider
    • isAclEditor

      public boolean isAclEditor(io.deephaven.enterprise.auth.UserContext userContext)
      Specified by:
      isAclEditor in interface IrisGroupProvider
    • isSchemaManager

      public boolean isSchemaManager(io.deephaven.enterprise.auth.UserContext userContext)
      Specified by:
      isSchemaManager in interface IrisGroupProvider
    • isQueryManager

      public boolean isQueryManager(io.deephaven.enterprise.auth.UserContext userContext)
      Specified by:
      isQueryManager in interface IrisGroupProvider
    • getAllGroups

      public String[] getAllGroups()
      Specified by:
      getAllGroups in interface IrisGroupProvider
    • getAllUsers

      public String[] getAllUsers()
      Specified by:
      getAllUsers in interface IrisGroupProvider
    • getUserType

      public IrisGroupProvider.UserType getUserType(io.deephaven.enterprise.auth.UserContext userContext)
      Specified by:
      getUserType in interface IrisGroupProvider
    • addRefreshListener

      public void addRefreshListener(com.fishlib.base.Procedure.Nullary listener)
    • removeRefreshListener

      public void removeRefreshListener(com.fishlib.base.Procedure.Nullary listener)