anchela commented on code in PR #45:
URL:
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/45#discussion_r1366971895
##########
src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java:
##########
@@ -156,8 +156,11 @@ private static void setAcl(Session session, List<String>
principals, String jcrP
if (principal == null) {
// backwards compatibility: fallback to original code treating
principal name as authorizable ID (see SLING-8604)
final Authorizable authorizable =
UserUtil.getAuthorizable(session, name);
- checkState(authorizable != null, "Authorizable not found:
{0}", name);
- principal = authorizable.getPrincipal();
+ if (authorizable != null) {
+ principal = authorizable.getPrincipal();
+ } else {
+ principal = () -> name;
Review Comment:
since the previous behavior was to throw an exception, i would recommend to
at least log a warning here.
--
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]