public class UserPermissionServiceImpl extends AbstractDmnBasedPermissionHelper<com.flowable.core.idm.api.PlatformUser> implements com.flowable.core.idm.api.UserPermissionService
| Modifier and Type | Field and Description |
|---|---|
protected com.flowable.idm.engine.CoreIdmEngineConfiguration |
coreIdmEngineConfiguration |
protected String |
decisionKeyDefaultPermissions |
NONE_VALUE, OUTPUT_KEY_ERROR_MESSAGE, OUTPUT_KEY_ERROR_MESSAGE_CODE, OUTPUT_KEY_GROUP_NEEDED, OUTPUT_KEY_PERMISSION| Constructor and Description |
|---|
UserPermissionServiceImpl(com.flowable.idm.engine.CoreIdmEngineConfiguration coreIdmEngineConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
checkUserCreation(String userId,
String userToCreateId) |
Optional<String> |
checkUserDeactivation(String userId,
String userToDeactivateId) |
Optional<String> |
checkUserReactivation(String userId,
String userToReactivateId) |
protected Map<String,Object> |
createRuleInputForDefaultModel(String userId,
AuthorizedAction action,
com.flowable.core.idm.api.PlatformUser scopedObject,
Map detailedRuleInput,
org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
If
AbstractDmnBasedPermissionHelper.getDecisionKeyDefaultPermissions() returns a non-null value, this method must be implemented in order to create the rule input data for
evaluating the default permission model. |
protected String |
getDecisionKeyDefaultPermissions()
If the permission helper is based on a default and detail DMN permission rule mechanism, this method must return the DMN key of the default
permission rule model to execute.
|
protected String |
getTenantId(com.flowable.core.idm.api.PlatformUser user) |
void |
setDecisionKeyDefaultPermissions(String decisionKeyDefaultPermissions) |
evaluateDefaultPermissionOutput, evaluatePermissionRuleOutput, evaluatePermissionsAndProcessResult, executeAndLogPermissionModel, getEmptyListOnNullValue, getGroups, isGroupMember, isUserMemberOfGroup, isUserType, processErrorMessage, renderErrorMessageprotected String decisionKeyDefaultPermissions
protected final com.flowable.idm.engine.CoreIdmEngineConfiguration coreIdmEngineConfiguration
public UserPermissionServiceImpl(com.flowable.idm.engine.CoreIdmEngineConfiguration coreIdmEngineConfiguration)
public Optional<String> checkUserCreation(String userId, String userToCreateId)
checkUserCreation in interface com.flowable.core.idm.api.UserPermissionServicepublic Optional<String> checkUserDeactivation(String userId, String userToDeactivateId)
checkUserDeactivation in interface com.flowable.core.idm.api.UserPermissionServicepublic Optional<String> checkUserReactivation(String userId, String userToReactivateId)
checkUserReactivation in interface com.flowable.core.idm.api.UserPermissionServiceprotected Map<String,Object> createRuleInputForDefaultModel(String userId, AuthorizedAction action, com.flowable.core.idm.api.PlatformUser scopedObject, Map detailedRuleInput, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
AbstractDmnBasedPermissionHelperAbstractDmnBasedPermissionHelper.getDecisionKeyDefaultPermissions() returns a non-null value, this method must be implemented in order to create the rule input data for
evaluating the default permission model. The easiest way is by just returning the same rule input as being used for the detailed rule model, but
in some cases, the rule input data is different for the default DMN model.createRuleInputForDefaultModel in class AbstractDmnBasedPermissionHelper<com.flowable.core.idm.api.PlatformUser>userId - the id of the user to test for action permissionsaction - the action to test privilegesscopedObject - the optional scoped object for which the action should be checkeddetailedRuleInput - the rule input as provided and used for the detailed rule model executioncommandContext - the command context used for execution or access to further servicesprotected String getTenantId(com.flowable.core.idm.api.PlatformUser user)
getTenantId in class AbstractDmnBasedPermissionHelper<com.flowable.core.idm.api.PlatformUser>protected String getDecisionKeyDefaultPermissions()
AbstractDmnBasedPermissionHelpergetDecisionKeyDefaultPermissions in class AbstractDmnBasedPermissionHelper<com.flowable.core.idm.api.PlatformUser>null, if none neededpublic void setDecisionKeyDefaultPermissions(String decisionKeyDefaultPermissions)
Copyright © 2019. All rights reserved.