Hi fml2,
thanks again for bringing this up.
Please note that we have derived from using one general class holding all possible permissions for all resources with https://jira.camunda.com/browse/CAM-9548 and all of its related tickets.
Instead, each resource now holds its own set of permissions.
Therefore, fetching the permissions in your last step should also happen with the specific set of permissions of that resource.
Specifically, you would have to replace
var permList = List.of(auth.getPermissions(Permissions.values()));
with
var permList = List.of(auth.getPermissions(UserOperationLogCategoryPermissions.values()));
Doing so will consider all permissions available for the OPERATION_LOG_CATEGORY when checking which of those the specific authorization contains.
Using the Permissions values for the PROCESS_DEFINITION works (at least for the READ permission) because the PROCESS_DEFINITION is listed in the supported resources in the Permissions#READ enum value.
The OPERATION_LOG_CATEGORY is not, therefore, it doesn't return that permission in your case.
Those resource lists are not maintained anymore. Specific resources can and do define specific permissions (like SET in SystemPermissions) that are not covered in the general Permissions at all.
Therefore, using the Permissions values can yield incomplete results here and there, no matter if the resource lists are maintained or not.
Thus, using the resource-specific set of permissions is the way to go here.
Hope that helps,
Tobias
Hi fml2,
thanks for raising this!
We will have a look at it as soon as possible and update the ticket with any feedback we have.
Best,
Tobias