This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git
The following commit(s) were added to refs/heads/master by this push:
new 5a52b97 SLING-9971: AclManagerTest/RepPolicyEntryHandlerTest : no
tests for '… (#44)
5a52b97 is described below
commit 5a52b97a4913468771bc783ff8fd85b1513f88af
Author: Karl Pauls <[email protected]>
AuthorDate: Thu Dec 10 23:32:55 2020 +0100
SLING-9971: AclManagerTest/RepPolicyEntryHandlerTest : no tests for '… (#44)
---
.../feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java | 5 +++--
.../handlers/jcr_root/home/users/system/asd/_rep_policy.xml | 8 ++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git
a/src/test/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java
b/src/test/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java
index b0ef6b4..07cf136 100644
---
a/src/test/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java
+++
b/src/test/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java
@@ -174,7 +174,7 @@ public final class RepPolicyEntryHandlerTest {
+ " <rep:restrictions
jcr:primaryType=\"rep:Restrictions\" rep:glob=\"{Name}[*/oak:index/*]\"/>" +
System.lineSeparator()
+ " </allow0>" + System.lineSeparator()
+ " <allow1 jcr:primaryType=\"rep:GrantACE\"
rep:principalName=\"acs-commons-dispatcher-flush-service\"
rep:privileges=\"{Name}[jcr:read,crx:replicate,jcr:removeNode]\"/>" +
System.lineSeparator()
- +
+ + " <deny0 jcr:primaryType=\"rep:DenyACE\"
rep:principalName=\"acs-commons-dispatcher-flush-service\"
rep:privileges=\"{Name}[jcr:write]\"/>" + System.lineSeparator() +
"</jcr:root>" + System.lineSeparator();
actual = result.getExcludedAcls();
assertEquals(expected, actual);
@@ -196,6 +196,7 @@ public final class RepPolicyEntryHandlerTest {
"create path (sling:Folder) /home/users/system/asd" +
System.lineSeparator() +
"set ACL for
acs-commons-package-replication-status-event-service" + System.lineSeparator() +
"allow
jcr:read,rep:write,jcr:readAccessControl,jcr:modifyAccessControl on
/home/users/system/asd" + System.lineSeparator() +
+ "deny jcr:write on /home/users/system/asd" +
System.lineSeparator() +
"end" + System.lineSeparator();
String actual = repoinitExtension.getText();
assertEquals(expected, actual);
@@ -214,7 +215,7 @@ public final class RepPolicyEntryHandlerTest {
+ " <allow3 jcr:primaryType=\"rep:GrantACE\"
rep:principalName=\"acs-commons-ensure-service-user-service\"
rep:privileges=\"{Name}[jcr:read,rep:write,jcr:readAccessControl,jcr:modifyAccessControl]\"/>"
+ System.lineSeparator()
+ " <allow4 jcr:primaryType=\"rep:GrantACE\"
rep:principalName=\"acs-commons-automatic-package-replicator-service\"
rep:privileges=\"{Name}[jcr:read]\"/>" + System.lineSeparator()
+ " <allow5 jcr:primaryType=\"rep:GrantACE\"
rep:principalName=\"acs-commons-on-deploy-scripts-service\"
rep:privileges=\"{Name}[jcr:read]\"/>" + System.lineSeparator()
- +
+ + " <deny0 jcr:primaryType=\"rep:DenyACE\"
rep:principalName=\"acs-commons-dispatcher-flush-service\"
rep:privileges=\"{Name}[jcr:write]\"/>" + System.lineSeparator() +
"</jcr:root>" + System.lineSeparator();
actual = result.getExcludedAcls();
assertEquals(expected, actual);
diff --git
a/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/home/users/system/asd/_rep_policy.xml
b/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/home/users/system/asd/_rep_policy.xml
index 66bb45c..7011d53 100644
---
a/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/home/users/system/asd/_rep_policy.xml
+++
b/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/home/users/system/asd/_rep_policy.xml
@@ -45,4 +45,12 @@
jcr:primaryType="rep:GrantACE"
rep:principalName="acs-commons-on-deploy-scripts-service"
rep:privileges="{Name}[jcr:read]"/>
+ <deny0
+ jcr:primaryType="rep:DenyACE"
+ rep:principalName="acs-commons-dispatcher-flush-service"
+ rep:privileges="{Name}[jcr:write]"/>
+ <deny1
+ jcr:primaryType="rep:DenyACE"
+
rep:principalName="acs-commons-package-replication-status-event-service"
+ rep:privileges="{Name}[jcr:write]"/>
</jcr:root>