Package com.illumon.iris.controller
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.permissions.IrisGroupProvider
IrisGroupProvider.UserType -
Field Summary
Fields inherited from interface com.illumon.iris.db.v2.permissions.IrisGroupProvider
FULL_ACCESS_GROUP, IRIS_ACLEDITORS, IRIS_QUERYMANAGERS, IRIS_SCHEMAMANAGERS, IRIS_SUPERUSERS, NON_INTERACTIVE_GROUP, QUERY_VIEW_ONLY_GROUP -
Constructor Summary
Constructors Constructor Description IrisUserContext(com.fishlib.auth.UserContext userContext, IrisGroupProvider wrappedProvider) -
Method Summary
Modifier and Type Method Description voidaddRefreshListener(com.fishlib.base.Procedure.Nullary listener)String[]getAllGroups()String[]getAllUsers()String[]getGroupsForUser()String[]getGroupsForUser(com.fishlib.auth.UserContext userContext)com.fishlib.auth.UserContextgetUserContext()String[]getUsersForGroup(String group)IrisGroupProvider.UserTypegetUserType()IrisGroupProvider.UserTypegetUserType(com.fishlib.auth.UserContext userContext)booleanisAclEditor()booleanisAclEditor(com.fishlib.auth.UserContext userContext)booleanisMember(com.fishlib.auth.UserContext userContext, String owner, String[] groups)booleanisMember(String owner, String[] groups)booleanisQueryManager()booleanisQueryManager(com.fishlib.auth.UserContext userContext)booleanisSchemaManager()booleanisSchemaManager(com.fishlib.auth.UserContext userContext)booleanisSuperUser()booleanisSuperUser(com.fishlib.auth.UserContext userContext)voidrefreshGroups()voidremoveRefreshListener(com.fishlib.base.Procedure.Nullary listener)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.permissions.IrisGroupProvider
getRunAsUser, getRunAsUserMap
-
Constructor Details
-
IrisUserContext
public IrisUserContext(@NotNull com.fishlib.auth.UserContext userContext, @NotNull IrisGroupProvider wrappedProvider)
-
-
Method Details
-
refreshGroups
public void refreshGroups() -
getUserContext
@NotNull public com.fishlib.auth.UserContext getUserContext() -
isSuperUser
public boolean isSuperUser() -
isAclEditor
public boolean isAclEditor() -
isSchemaManager
public boolean isSchemaManager() -
isQueryManager
public boolean isQueryManager() -
getUserType
-
isMember
-
isMember
public final boolean isMember(com.fishlib.auth.UserContext userContext, String owner, String[] groups)- Specified by:
isMemberin interfaceIrisGroupProvider
-
getGroupsForUser
-
getGroupsForUser
- Specified by:
getGroupsForUserin interfaceIrisGroupProvider
-
getUsersForGroup
- Specified by:
getUsersForGroupin interfaceIrisGroupProvider
-
isSuperUser
public boolean isSuperUser(com.fishlib.auth.UserContext userContext)- Specified by:
isSuperUserin interfaceIrisGroupProvider
-
isAclEditor
public boolean isAclEditor(com.fishlib.auth.UserContext userContext)- Specified by:
isAclEditorin interfaceIrisGroupProvider
-
isSchemaManager
public boolean isSchemaManager(com.fishlib.auth.UserContext userContext)- Specified by:
isSchemaManagerin interfaceIrisGroupProvider
-
isQueryManager
public boolean isQueryManager(com.fishlib.auth.UserContext userContext)- Specified by:
isQueryManagerin interfaceIrisGroupProvider
-
getAllGroups
- Specified by:
getAllGroupsin interfaceIrisGroupProvider
-
getAllUsers
- Specified by:
getAllUsersin interfaceIrisGroupProvider
-
getUserType
- Specified by:
getUserTypein interfaceIrisGroupProvider
-
addRefreshListener
public void addRefreshListener(com.fishlib.base.Procedure.Nullary listener) -
removeRefreshListener
public void removeRefreshListener(com.fishlib.base.Procedure.Nullary listener)
-