ilgrosso commented on code in PR #413:
URL: https://github.com/apache/syncope/pull/413#discussion_r1114248818


##########
wa/starter/src/main/java/org/apache/syncope/wa/starter/mapping/DefaultAccessMapper.java:
##########
@@ -43,10 +45,12 @@ public RegisteredServiceAccessStrategy build(final 
AccessPolicyTO policy) {
         
accessStrategy.setUnauthorizedRedirectUrl(conf.getUnauthorizedRedirectUrl());
 
         conf.getRequiredAttrs().forEach(
-                attr -> 
accessStrategy.getRequiredAttributes().put(attr.getSchema(), new 
HashSet<>(attr.getValues())));
+                (k, v) -> accessStrategy.getRequiredAttributes().put(k,
+                        new HashSet<>(Set.of(StringUtils.split(v, ",")))));

Review Comment:
   Questions:
   1. are `new Hashet<>(Set.of(...))` both required? wouldn't be enough to have 
`Set.of(...)`?
   2. can we `trim()` the values after splitting by `,`? I'd like to avoid 
issues if one inputs `value1, value2` as oppositve as `value1,value2`



-- 
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: dev-unsubscr...@syncope.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to