-
Task
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
The duplicated values of the Permissions lead to problems when checking the authorizations. For example Permissions.CREATE_BATCH_DELETE_DECISION_INSTANCES and Permissions.UPDATE_INSTANCE values are duplicated.
Please check the following test case:
public void testAuthorizations() { Authorization authorization = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); authorization.setUserId(userId); authorization.addPermission(BatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCES); authorization.setResource(Resources.BATCH); authorization.setResourceId(ANY); authorizationService.saveAuthorization(authorization); processEngineConfiguration.setAuthorizationEnabled(true); assertEquals(false, authorizationService.isUserAuthorized(userId, Arrays.asList(groupId), Permissions.UPDATE_INSTANCE, Resources.BATCH)); assertEquals(true, authorizationService.isUserAuthorized(userId, Arrays.asList(groupId), BatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCES, Resources.BATCH)); assertTrue(authorization.isPermissionRevoked(BatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCES)); assertFalse(authorization.isPermissionRevoked(Permissions.UPDATE_INSTANCE)); }
Investigate for all of the places where the duplication is problematic and fix accordingly.
Rest API is affected as well: https://github.com/camunda/camunda-bpm-platform/blob/cf36405e281cf83860abadbe6c966fd8464519d6/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/AuthorizationRestService.java#L43
Please have look at:
https://github.com/camunda/camunda-bpm-platform/blob/cf36405e281cf83860abadbe6c966fd8464519d6/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/util/AuthorizationUtil.java#L37
This is the controller panel for Smart Panels app
- is related to
-
CAM-9548 Advanced Operator Authorizations
- Closed