You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by si...@apache.org on 2019/07/01 14:07:45 UTC

[sling-org-apache-sling-feature-cpconverter] branch avoid_subpackages_flattering updated: SLING-8544 - [cp2fm] service users need to be created with intermediate path

This is an automated email from the ASF dual-hosted git repository.

simonetripodi pushed a commit to branch avoid_subpackages_flattering
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git


The following commit(s) were added to refs/heads/avoid_subpackages_flattering by this push:
     new 02107c2  SLING-8544 - [cp2fm] service users need to be created with intermediate path
02107c2 is described below

commit 02107c26c8cb78975ef08934826c4c52b368b813
Author: Simo Tripodi <st...@adobe.com>
AuthorDate: Mon Jul 1 16:07:38 2019 +0200

    SLING-8544 - [cp2fm] service users need to be created with intermediate
    path
    
    use the absolute path to create service user
---
 .../feature/cpconverter/acl/DefaultAclManager.java   |  2 +-
 .../feature/cpconverter/acl/AclManagerTest.java      |  2 +-
 .../handlers/RepPolicyEntryHandlerTest.java          | 20 ++++++++++----------
 .../handlers/SystemUsersEntryHandlerTest.java        |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/cpconverter/acl/DefaultAclManager.java b/src/main/java/org/apache/sling/feature/cpconverter/acl/DefaultAclManager.java
index 11c8c4c..c6a8819 100644
--- a/src/main/java/org/apache/sling/feature/cpconverter/acl/DefaultAclManager.java
+++ b/src/main/java/org/apache/sling/feature/cpconverter/acl/DefaultAclManager.java
@@ -110,7 +110,7 @@ public final class DefaultAclManager implements AclManager {
 
                 // make sure all users are created first
 
-                formatter.format("create service user %s with path %s%n", systemUser.getId(), systemUser.getPath().getFileName());
+                formatter.format("create service user %s with path /home/users/system/%s%n", systemUser.getId(), systemUser.getPath().getFileName());
 
                 // create then the paths
 
diff --git a/src/test/java/org/apache/sling/feature/cpconverter/acl/AclManagerTest.java b/src/test/java/org/apache/sling/feature/cpconverter/acl/AclManagerTest.java
index 2fc239b..8dc0a08 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/acl/AclManagerTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/acl/AclManagerTest.java
@@ -73,7 +73,7 @@ public class AclManagerTest {
         assertNotNull(repoinitExtension);
 
         // acs-commons-on-deploy-scripts-service will be missed
-        String expected = "create service user acs-commons-package-replication-status-event-service with path public\n" + 
+        String expected = "create service user acs-commons-package-replication-status-event-service with path /home/users/system/public\n" + 
                 "create path (sling:Folder) /asd\n" + 
                 "create path (sling:Folder) /asd/public\n" +
                 "set ACL for acs-commons-package-replication-status-event-service\n" + 
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 a94cf52..a8eea3f 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
@@ -87,29 +87,29 @@ public final class RepPolicyEntryHandlerTest {
         assertNotNull(repoinitExtension);
         assertEquals(ExtensionType.TEXT, repoinitExtension.getType());
 
-        String expected = "create service user acs-commons-ensure-oak-index-service with path public\n" + 
+        String expected = "create service user acs-commons-ensure-oak-index-service with path /home/users/system/public\n" + 
                 "create path (sling:Folder) /asd\n" + 
                 "create path (sling:Folder) /asd/public\n" + 
                 "set ACL for acs-commons-ensure-oak-index-service\n" + 
                 "allow jcr:read,rep:write,rep:indexDefinitionManagement on /asd/public restriction(rep:glob,*/oak:index/*)\n" + 
                 "end\n" + 
-                "create service user acs-commons-dispatcher-flush-service with path public\n" + 
+                "create service user acs-commons-dispatcher-flush-service with path /home/users/system/public\n" + 
                 "set ACL for acs-commons-dispatcher-flush-service\n" + 
                 "allow jcr:read,crx:replicate,jcr:removeNode on /asd/public\n" + 
                 "end\n" + 
-                "create service user acs-commons-package-replication-status-event-service with path public\n" + 
+                "create service user acs-commons-package-replication-status-event-service with path /home/users/system/public\n" + 
                 "set ACL for acs-commons-package-replication-status-event-service\n" + 
                 "allow jcr:read,rep:write,jcr:readAccessControl,jcr:modifyAccessControl on /asd/public\n" + 
                 "end\n" + 
-                "create service user acs-commons-ensure-service-user-service with path public\n" + 
+                "create service user acs-commons-ensure-service-user-service with path /home/users/system/public\n" + 
                 "set ACL for acs-commons-ensure-service-user-service\n" + 
                 "allow jcr:read,rep:write,jcr:readAccessControl,jcr:modifyAccessControl on /asd/public\n" + 
                 "end\n" + 
-                "create service user acs-commons-automatic-package-replicator-service with path public\n" + 
+                "create service user acs-commons-automatic-package-replicator-service with path /home/users/system/public\n" + 
                 "set ACL for acs-commons-automatic-package-replicator-service\n" + 
                 "allow jcr:read on /asd/public\n" + 
                 "end\n" + 
-                "create service user acs-commons-on-deploy-scripts-service with path public\n" + 
+                "create service user acs-commons-on-deploy-scripts-service with path /home/users/system/public\n" + 
                 "set ACL for acs-commons-on-deploy-scripts-service\n" + 
                 "allow jcr:read on /asd/public\n" + 
                 "end\n";
@@ -126,21 +126,21 @@ public final class RepPolicyEntryHandlerTest {
         assertNotNull(repoinitExtension);
         assertEquals(ExtensionType.TEXT, repoinitExtension.getType());
 
-        String expected = "create service user acs-commons-package-replication-status-event-service with path public\n" + 
+        String expected = "create service user acs-commons-package-replication-status-event-service with path /home/users/system/public\n" + 
                 "create path (sling:Folder) /asd\n" + 
                 "create path (sling:Folder) /asd/public\n" + 
                 "set ACL for acs-commons-package-replication-status-event-service\n" + 
                 "allow jcr:read,rep:write,jcr:readAccessControl,jcr:modifyAccessControl on /asd/public\n" + 
                 "end\n" + 
-                "create service user acs-commons-ensure-service-user-service with path public\n" + 
+                "create service user acs-commons-ensure-service-user-service with path /home/users/system/public\n" + 
                 "set ACL for acs-commons-ensure-service-user-service\n" + 
                 "allow jcr:read,rep:write,jcr:readAccessControl,jcr:modifyAccessControl on /asd/public\n" + 
                 "end\n" + 
-                "create service user acs-commons-automatic-package-replicator-service with path public\n" + 
+                "create service user acs-commons-automatic-package-replicator-service with path /home/users/system/public\n" + 
                 "set ACL for acs-commons-automatic-package-replicator-service\n" + 
                 "allow jcr:read on /asd/public\n" + 
                 "end\n" + 
-                "create service user acs-commons-on-deploy-scripts-service with path public\n" + 
+                "create service user acs-commons-on-deploy-scripts-service with path /home/users/system/public\n" + 
                 "set ACL for acs-commons-on-deploy-scripts-service\n" + 
                 "allow jcr:read on /asd/public\n" + 
                 "end\n";
diff --git a/src/test/java/org/apache/sling/feature/cpconverter/handlers/SystemUsersEntryHandlerTest.java b/src/test/java/org/apache/sling/feature/cpconverter/handlers/SystemUsersEntryHandlerTest.java
index a4f133a..c43d3a5 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/handlers/SystemUsersEntryHandlerTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/handlers/SystemUsersEntryHandlerTest.java
@@ -76,7 +76,7 @@ public class SystemUsersEntryHandlerTest {
         assertEquals(ExtensionType.TEXT, repoinitExtension.getType());
         assertTrue(repoinitExtension.isRequired());
 
-        String expected = "create service user asd-share-commons-asd-index-definition-reader-service with path asd-index-definition-reader\n";
+        String expected = "create service user asd-share-commons-asd-index-definition-reader-service with path /home/users/system/asd-index-definition-reader\n";
         String actual = repoinitExtension.getText();
         assertEquals(expected, actual);
     }