public class CmsDefaultPermissionHandler extends java.lang.Object implements I_CmsPermissionHandler
I_CmsPermissionHandler.CmsPermissionCheckResult| 限定符和类型 | 字段和说明 |
|---|---|
protected CmsDriverManager |
m_driverManager
Driver Manager instance.
|
protected CmsSecurityManager |
m_securityManager
Security Manager instance.
|
PERM_ALLOWED, PERM_DENIED, PERM_FILTERED, PERM_NOTLOCKED| 构造器和说明 |
|---|
CmsDefaultPermissionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
I_CmsPermissionHandler.CmsPermissionCheckResult |
hasPermissions(CmsDbContext dbc,
CmsResource resource,
CmsPermissionSet requiredPermissions,
boolean checkLock,
CmsResourceFilter filter)
Performs a non-blocking permission check on a resource.
|
void |
init(CmsDriverManager driverManager,
CmsSystemConfiguration systemConfiguration)
Initializes internal variables needed to work.
|
protected CmsDriverManager m_driverManager
protected CmsSecurityManager m_securityManager
public I_CmsPermissionHandler.CmsPermissionCheckResult hasPermissions(CmsDbContext dbc, CmsResource resource, CmsPermissionSet requiredPermissions, boolean checkLock, CmsResourceFilter filter) throws CmsException
I_CmsPermissionHandlerThis 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_ALLOWEDI_CmsPermissionHandler.PERM_FILTEREDI_CmsPermissionHandler.PERM_DENIEDDespite 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.
hasPermissions 在接口中 I_CmsPermissionHandlerdbc - the current database contextresource - the resource on which permissions are requiredrequiredPermissions - the set of permissions required for the operationcheckLock - if true, a lock for the current user is required for
all write operations, if false it's ok to write as long as the resource
is not locked by another userfilter - the resource filter to useI_CmsPermissionHandler.PERM_ALLOWED if the user has sufficient permissions on the resource
for the requested operationCmsException - in case of i/o errors (NOT because of insufficient permissions)I_CmsPermissionHandler.hasPermissions(org.opencms.db.CmsDbContext, org.opencms.file.CmsResource, org.opencms.security.CmsPermissionSet, boolean, org.opencms.file.CmsResourceFilter)public void init(CmsDriverManager driverManager, CmsSystemConfiguration systemConfiguration)
I_CmsPermissionHandlerinit 在接口中 I_CmsPermissionHandlerdriverManager - the driver managersystemConfiguration - the system configuration instanceI_CmsPermissionHandler.init(org.opencms.db.CmsDriverManager, CmsSystemConfiguration)