Package org.opencms.security
Class CmsDefaultPermissionHandler
java.lang.Object
org.opencms.security.CmsDefaultPermissionHandler
- All Implemented Interfaces:
I_CmsPermissionHandler
Generic base driver interface.
- Since:
- 7.0.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.security.I_CmsPermissionHandler
I_CmsPermissionHandler.CmsPermissionCheckResult, I_CmsPermissionHandler.LockCheck
-
Field Summary
Modifier and TypeFieldDescriptionprotected CmsDriverManager
Driver Manager instance.protected CmsSecurityManager
Security Manager instance.Fields inherited from interface org.opencms.security.I_CmsPermissionHandler
PERM_ALLOWED, PERM_DENIED, PERM_FILTERED, PERM_NOTLOCKED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionhasPermissions
(CmsDbContext dbc, CmsResource resource, CmsPermissionSet requiredPermissions, I_CmsPermissionHandler.LockCheck checkLock, CmsResourceFilter filter) Performs a non-blocking permission check on a resource.void
init
(CmsDriverManager driverManager, CmsSystemConfiguration systemConfiguration) Initializes internal variables needed to work.
-
Field Details
-
m_driverManager
Driver Manager instance. -
m_securityManager
Security Manager instance.
-
-
Constructor Details
-
CmsDefaultPermissionHandler
public CmsDefaultPermissionHandler()
-
-
Method Details
-
hasPermissions
public I_CmsPermissionHandler.CmsPermissionCheckResult hasPermissions(CmsDbContext dbc, CmsResource resource, CmsPermissionSet requiredPermissions, I_CmsPermissionHandler.LockCheck checkLock, CmsResourceFilter filter) throws CmsException Description copied from interface:I_CmsPermissionHandler
Performs a non-blocking permission check on a resource.This test will not throw an exception in case the required permissions are not available for the requested operation. Instead, it will return one of the following values:
I_CmsPermissionHandler.PERM_ALLOWED
I_CmsPermissionHandler.PERM_FILTERED
I_CmsPermissionHandler.PERM_DENIED
Despite of the fact that the results of this method are cached, this method should be as fast as possible since it is called really often.
- Specified by:
hasPermissions
in interfaceI_CmsPermissionHandler
- Parameters:
dbc
- the current database contextresource
- the resource on which permissions are requiredrequiredPermissions
- the set of permissions required for the operationcheckLock
- the type of lock check to perform for write operationsfilter
- the resource filter to use- Returns:
if the user has sufficient permissions on the resource for the requested operationI_CmsPermissionHandler.PERM_ALLOWED
- Throws:
CmsException
- in case of i/o errors (NOT because of insufficient permissions)- See Also:
-
init
Description copied from interface:I_CmsPermissionHandler
Initializes internal variables needed to work.- Specified by:
init
in interfaceI_CmsPermissionHandler
- Parameters:
driverManager
- the driver managersystemConfiguration
- the system configuration instance- See Also:
-