Package org.infinispan.security.impl
Class AuthorizationManagerImpl
java.lang.Object
org.infinispan.security.impl.AuthorizationManagerImpl
- All Implemented Interfaces:
AuthorizationManager
AuthorizationManagerImpl. An implementation of the
AuthorizationManager
interface.- Since:
- 7.0
- Author:
- Tristan Tarrant
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkPermission
(Subject subject, AuthorizationPermission perm) Verifies that theSubject
has the requested permission.void
checkPermission
(Subject subject, AuthorizationPermission perm, String role) Verifies that theSubject
has the requested permission and role.void
Verifies that theSubject
associated with the currentAccessControlContext
has the requested permission.void
checkPermission
(AuthorizationPermission perm, String role) Verifies that theSubject
associated with the currentAccessControlContext
has the requested permission and role.void
doIf
(Subject subject, AuthorizationPermission permission, Runnable runnable) Executes the runnable only if the current user has the specified permissiongetPermissions
(Subject subject) Returns the permissions that the specifiedSubject
has for the cacheReturns the permission required to write to the resource associated with this AuthorizationManager.void
init
(String cacheName, GlobalConfiguration globalConfiguration, Configuration configuration, GlobalSecurityManager globalSecurityManager) boolean
-
Constructor Details
-
AuthorizationManagerImpl
public AuthorizationManagerImpl()
-
-
Method Details
-
init
public void init(String cacheName, GlobalConfiguration globalConfiguration, Configuration configuration, GlobalSecurityManager globalSecurityManager) -
checkPermission
Description copied from interface:AuthorizationManager
Verifies that theSubject
associated with the currentAccessControlContext
has the requested permission. ASecurityException
is thrown otherwise.- Specified by:
checkPermission
in interfaceAuthorizationManager
-
checkPermission
Description copied from interface:AuthorizationManager
Verifies that theSubject
has the requested permission. ASecurityException
is thrown otherwise.- Specified by:
checkPermission
in interfaceAuthorizationManager
-
checkPermission
Description copied from interface:AuthorizationManager
Verifies that theSubject
associated with the currentAccessControlContext
has the requested permission and role. ASecurityException
is thrown otherwise.- Specified by:
checkPermission
in interfaceAuthorizationManager
-
checkPermission
Description copied from interface:AuthorizationManager
Verifies that theSubject
has the requested permission and role. ASecurityException
is thrown otherwise.- Specified by:
checkPermission
in interfaceAuthorizationManager
-
getPermissions
Description copied from interface:AuthorizationManager
Returns the permissions that the specifiedSubject
has for the cache- Specified by:
getPermissions
in interfaceAuthorizationManager
-
getWritePermission
Description copied from interface:AuthorizationManager
Returns the permission required to write to the resource associated with this AuthorizationManager.- Specified by:
getWritePermission
in interfaceAuthorizationManager
-
doIf
Description copied from interface:AuthorizationManager
Executes the runnable only if the current user has the specified permission- Specified by:
doIf
in interfaceAuthorizationManager
-
isPermissive
public boolean isPermissive()- Specified by:
isPermissive
in interfaceAuthorizationManager
-