Class UserPermissionServiceImpl
java.lang.Object
com.flowable.platform.service.permission.AbstractDmnBasedPermissionHelper<PlatformUser>
com.flowable.platform.service.permission.UserPermissionServiceImpl
- All Implemented Interfaces:
UserPermissionService
public class UserPermissionServiceImpl
extends AbstractDmnBasedPermissionHelper<PlatformUser>
implements UserPermissionService
The default permission service implementing permission checks in the context of a user. Its based on a single permission model used for all actions.
- Author:
- Micha Kiener
-
Field Summary
Fields inherited from class com.flowable.platform.service.permission.AbstractDmnBasedPermissionHelper
NONE_VALUE, OUTPUT_KEY_ERROR_MESSAGE, OUTPUT_KEY_ERROR_MESSAGE_CODE, OUTPUT_KEY_GROUP_NEEDED, OUTPUT_KEY_PERMISSION
-
Constructor Summary
ConstructorDescriptionUserPermissionServiceImpl
(CoreIdmEngineConfiguration coreIdmEngineConfiguration) -
Method Summary
Modifier and TypeMethodDescriptioncheckUserCreation
(String userId, String userToCreateId) Deprecated.checkUserCreation
(String userId, Collection<String> userGroupKeys, String userTenantId, String userToCreateId) checkUserDeactivation
(String userId, String userToDeactivateId) Deprecated.checkUserDeactivation
(String userId, Collection<String> userGroupKeys, String userTenantId, String userToDeactivateId) checkUserReactivation
(String userId, String userToReactivateId) Deprecated.checkUserReactivation
(String userId, Collection<String> userGroupKeys, String userTenantId, String userToReactivateId) createRuleInputForDefaultModel
(String userId, AuthorizedAction action, PlatformUser scopedObject, Map<String, Object> detailedRuleInput, CommandContext commandContext) IfAbstractDmnBasedPermissionHelper.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
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
(PlatformUser user) void
setDecisionKeyDefaultPermissions
(String decisionKeyDefaultPermissions) Methods inherited from class com.flowable.platform.service.permission.AbstractDmnBasedPermissionHelper
evaluateDefaultPermissionOutput, evaluatePermissionRuleOutput, evaluatePermissionsAndProcessResult, executeAndLogPermissionModel, getEmptyListOnNullValue, getGroups, isGroupMember, isUserMemberOfGroup, isUserType, processErrorMessage, renderErrorMessage
-
Field Details
-
decisionKeyDefaultPermissions
-
coreIdmEngineConfiguration
-
-
Constructor Details
-
UserPermissionServiceImpl
-
-
Method Details
-
checkUserCreation
Deprecated.- Specified by:
checkUserCreation
in interfaceUserPermissionService
-
checkUserCreation
public Optional<String> checkUserCreation(String userId, Collection<String> userGroupKeys, String userTenantId, String userToCreateId) - Specified by:
checkUserCreation
in interfaceUserPermissionService
-
checkUserDeactivation
Deprecated.- Specified by:
checkUserDeactivation
in interfaceUserPermissionService
-
checkUserDeactivation
public Optional<String> checkUserDeactivation(String userId, Collection<String> userGroupKeys, String userTenantId, String userToDeactivateId) - Specified by:
checkUserDeactivation
in interfaceUserPermissionService
-
checkUserReactivation
Deprecated.- Specified by:
checkUserReactivation
in interfaceUserPermissionService
-
checkUserReactivation
public Optional<String> checkUserReactivation(String userId, Collection<String> userGroupKeys, String userTenantId, String userToReactivateId) - Specified by:
checkUserReactivation
in interfaceUserPermissionService
-
createRuleInputForDefaultModel
protected Map<String,Object> createRuleInputForDefaultModel(String userId, AuthorizedAction action, PlatformUser scopedObject, Map<String, Object> detailedRuleInput, CommandContext commandContext) Description copied from class:AbstractDmnBasedPermissionHelper
IfAbstractDmnBasedPermissionHelper.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.- Specified by:
createRuleInputForDefaultModel
in classAbstractDmnBasedPermissionHelper<PlatformUser>
- Parameters:
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 services- Returns:
- the rule input data used for executing the default DMN permission model
-
getTenantId
- Specified by:
getTenantId
in classAbstractDmnBasedPermissionHelper<PlatformUser>
-
getDecisionKeyDefaultPermissions
Description copied from class:AbstractDmnBasedPermissionHelper
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.- Specified by:
getDecisionKeyDefaultPermissions
in classAbstractDmnBasedPermissionHelper<PlatformUser>
- Returns:
- the optional key of the default DMN permission model,
null
, if none needed
-
setDecisionKeyDefaultPermissions
-