You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2018/09/06 20:00:38 UTC

[sling-org-apache-sling-app-cms] branch master updated: Fixing permissings / configurations around the UGC user / service so it works correctly out of the box.

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

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/master by this push:
     new 495190f  Fixing permissings / configurations around the UGC user / service so it works correctly out of the box.
495190f is described below

commit 495190f81647393cf2c64d7e704be5cbc5d9590b
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Sep 6 16:00:34 2018 -0400

    Fixing permissings / configurations around the UGC user / service so it
    works correctly out of the box.
---
 builder/src/main/provisioning/cms.txt                          | 10 ----------
 .../core/usergenerated/impl/UserGeneratedContentConfig.java    |  2 +-
 ...ermapping.impl.ServiceUserMapperImpl.amended-sling-cms.json |  6 ++++++
 ...ping.impl.ServiceUserMapperImpl.amended-sling.rewriter.json |  6 ++++++
 4 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/builder/src/main/provisioning/cms.txt b/builder/src/main/provisioning/cms.txt
index 493f3c4..7f90d11 100644
--- a/builder/src/main/provisioning/cms.txt
+++ b/builder/src/main/provisioning/cms.txt
@@ -68,13 +68,3 @@
         allow   jcr:all    on /etc/usergenerated
     end
 
-
-[configurations]
-    org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling.rewriter
-        user.mapping=[
-            "org.apache.sling.rewriter\=sling-rewriter"
-        ]
-    org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling.ugc
-        user.mapping=[
-            "org.apache.sling.cms.core:sling-ugc\=sling-ugc"
-        ]
diff --git a/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentConfig.java b/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentConfig.java
index 049ce6d..9e11805 100644
--- a/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentConfig.java
+++ b/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentConfig.java
@@ -27,7 +27,7 @@ import org.osgi.service.metatype.annotations.AttributeType;
 public @interface UserGeneratedContentConfig {
 
 	@AttributeDefinition(name = "%ugcRoot.name", description = "%ugcRoot.description", defaultValue = "/etc/usergenerated")
-	String ugcRoot();
+	String ugcRoot() default"/etc/usergenerated";
 
 	@AttributeDefinition(name = "%defaultPathDepth.name", description = "%defaultPathDepth.description", type = AttributeType.INTEGER)
 	int defaultPathDepth() default 1;
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling-cms.json b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling-cms.json
new file mode 100644
index 0000000..8501f27
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling-cms.json
@@ -0,0 +1,6 @@
+{
+    "jcr:primaryType": "sling:OsgiConfig",
+    "user.mapping": [
+        "org.apache.sling.cms.core:sling-ugc=sling-ugc"
+    ]
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling.rewriter.json b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling.rewriter.json
new file mode 100644
index 0000000..995dced
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling.rewriter.json
@@ -0,0 +1,6 @@
+{
+    "jcr:primaryType": "sling:OsgiConfig",
+    "user.mapping": [
+        "org.apache.sling.rewriter=sling-rewriter"
+    ]
+}
\ No newline at end of file