Class AbstractDmsPolicyProcessor
java.lang.Object
ch.tocco.nice2.dms.spi.security.policyprocessor.AbstractDmsPolicyProcessor
- All Implemented Interfaces:
PolicyProcessor
- Direct Known Subclasses:
FolderReadPermissionForNonAnonymous
,PageReadPermissionForNonAnonymous
,PageReadPermissionForRedactor
,ResourceReadPermissionForNonAnonymous
Abstract
PolicyProcessor
implementation for policy processors
based on the Node_permission matrix for CMS/DMS entities.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Context
protected final PermissionMatrixEvaluationService
protected final TypeManager
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractDmsPolicyProcessor
(Context context, TypeManager typeManager, PermissionMatrixEvaluationService evaluationService, String targetModelName) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract @Nullable Node
getAdditionalCondition
(EntityModel entityModel) protected EntityModel
protected abstract String
protected abstract boolean
isSupported
(Principal principal) protected void
prependRule
(PolicyBuilder policy, EntityModel entityModel, AccessPermission permission, Node condition, boolean negative) final void
processPolicy
(PolicyBuilder policy, Object target) Post-process the given policy.
-
Field Details
-
context
-
typeManager
-
evaluationService
-
-
Constructor Details
-
AbstractDmsPolicyProcessor
protected AbstractDmsPolicyProcessor(Context context, TypeManager typeManager, PermissionMatrixEvaluationService evaluationService, String targetModelName)
-
-
Method Details
-
processPolicy
Description copied from interface:PolicyProcessor
Post-process the given policy. On phase `LOGIN`, the `target` is the principal being logged in, on phase `GUARD`, it's the object being guarded. On phase `LOGIN` the `policy` is the entire policy containing all rules that affect the current user, on phase `GUARD` the policy only contains the rules that are relevant to the guarded objects (the entire policy, if needed, can be retrieved from theSecurityContext
).- Specified by:
processPolicy
in interfacePolicyProcessor
-
prependRule
protected void prependRule(PolicyBuilder policy, EntityModel entityModel, AccessPermission permission, Node condition, boolean negative) -
getEntityModel
-
isSupported
-
getNodePermissionName
-
getAdditionalCondition
-