kwin commented on a change in pull request #61:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/61#discussion_r594965830



##########
File path: 
src/main/java/org/apache/sling/feature/cpconverter/accesscontrol/Mapping.java
##########
@@ -60,6 +66,9 @@ public Mapping(@NotNull final String spec) {
         if (s.charAt(0) == '[' && s.charAt(s.length()-1) == ']') {
             this.userName = null;
             this.principalNames = extractPrincipalNames(s);
+        } else if (enforceMappingByPrincipal) {
+            this.userName = null;
+            this.principalNames = Collections.singleton(s);

Review comment:
       > i am aware of the potential breaking nature 
   
   This is very dangerous and therefore cp2fm should either be a lossless 
conversion or throw an exception. Debugging issues like these is very hard as 
most consumers will not be aware of the potentially lossy transformation 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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to