elguardian commented on code in PR #4016:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4016#discussion_r2265901387
##########
jbpm/jbpm-usertask/src/main/java/org/kie/kogito/usertask/impl/lifecycle/DefaultUserTaskLifeCycle.java:
##########
@@ -221,6 +222,15 @@ private String assignStrategy(UserTaskInstance
userTaskInstance, IdentityProvide
return assignmentStrategy.computeAssignment(userTaskInstance,
identityProvider).orElse(null);
}
+ private void checkUserHasPermission(UserTaskInstance userTaskInstance,
String identityProviderName) {
+ Set<String> excludedUsers = userTaskInstance.getExcludedUsers();
+ if (excludedUsers != null &&
excludedUsers.contains(identityProviderName)) {
+ String message = String.format("User '%s' is not authorized to
perform an operation on user task '%s'",
+ identityProviderName, userTaskInstance.getId());
+ throw new UserTaskInstanceNotAuthorizedException(message);
+ }
+ }
+
private void checkPermission(UserTaskInstance userTaskInstance,
IdentityProvider identityProvider) {
Review Comment:
this needs to change to
private void checkPermission(UserTaskInstance userTaskInstance, String user
name) {
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]