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/07/17 20:13:05 UTC

[sling-org-apache-sling-app-cms] branch master updated (333c211 -> 7158c9f)

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

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


    from 333c211  Adding SCM
     new fdd7f0e  [maven-release-plugin] prepare release org.apache.sling.cms-0.9.0
     new 49b10cf  Fixing a too common error with the site object and a path problem for selinux
     new 75bfb32  Fixed to return the correct status code
     new b6e2d14  Moving the edit clientlibs to /static and fixing the z-index to display over top of bootstrap 4
     new 3d5b442  REmoving some warnings
     new a9fdada  Adding support for User Generated Content
     new 7158c9f  Merging latest changes

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 builder/pom.xml                                    |   4 +-
 builder/src/main/provisioning/cms.txt              |  16 +++
 core/pom.xml                                       |   6 +-
 .../java/org/apache/sling/cms/CMSConstants.java    |   5 +
 .../apache/sling/cms/core/models/ErrorHandler.java |   2 +-
 .../org/apache/sling/cms/core/models/Site.java     |   1 +
 .../cms/core/servlets/VersionInfoServlet.java      |   2 +-
 .../cms/core/usergenerated/UGCBucketConfig.java    |  87 +++++++++++++++
 .../usergenerated/UserGeneratedContentService.java |  53 +++++++++
 .../usergenerated/impl/ApproveUGCOperation.java    | 119 ++++++++++++++++++++
 .../impl/UserGeneratedContentConfig.java}          |  19 ++--
 .../impl/UserGeneratedContentServiceImpl.java      | 123 +++++++++++++++++++++
 .../main/resources/OSGI-INF/l10n/bundle.properties |  16 ++-
 pom.xml                                            |  22 ++--
 reference/pom.xml                                  |   8 +-
 ui/pom.xml                                         |   5 +-
 ui/src/main/frontend/src/scss/styles.scss          |   2 +-
 .../resources/SLING-INF/nodetypes/nodetypes.cnd    |  11 ++
 .../components/cms/pageeditbar/pageeditbar.jsp     |   2 +-
 .../cms/suffixproperty/suffixproperty.jsp          |  11 +-
 .../components/editor/scripts/finalize.jsp         |   2 +-
 .../sling-cms/components/editor/scripts/init.jsp   |   2 +-
 .../jcr_root/libs/sling-cms/content/start.json     |  10 ++
 .../sites.json => usergenerated/content.json}      |  74 +++++++------
 .../sling-cms/content/usergenerated/review.json    |  83 ++++++++++++++
 ....sling.engine.impl.auth.SlingAuthenticator.json |   3 +-
 .../clientlibs/sling-cms-editor/editor.css         |  65 ++++++-----
 .../clientlibs/sling-cms-editor/editor.js          |   0
 vagrant/Vagrantfile                                |   4 +-
 29 files changed, 642 insertions(+), 115 deletions(-)
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/usergenerated/UGCBucketConfig.java
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/usergenerated/UserGeneratedContentService.java
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/ApproveUGCOperation.java
 copy core/src/main/java/org/apache/sling/cms/core/{rewriter/ReferenceMappingTransformerConfig.java => usergenerated/impl/UserGeneratedContentConfig.java} (59%)
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentServiceImpl.java
 copy reference/src/main/resources/jcr_root/apps/reference/components/pages/base/base.jsp => ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/suffixproperty/suffixproperty.jsp (79%)
 copy ui/src/main/resources/jcr_root/libs/sling-cms/content/{site/sites.json => usergenerated/content.json} (73%)
 create mode 100644 ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/review.json
 rename ui/src/main/resources/jcr_root/{etc => static}/clientlibs/sling-cms-editor/editor.css (70%)
 rename ui/src/main/resources/jcr_root/{etc => static}/clientlibs/sling-cms-editor/editor.js (100%)


[sling-org-apache-sling-app-cms] 05/07: REmoving some warnings

Posted by dk...@apache.org.
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

commit 3d5b442c7406d0acbe2a4a063d8ff0b1c8c362ae
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Jul 17 16:10:48 2018 -0400

    REmoving some warnings
---
 .../java/org/apache/sling/cms/core/servlets/VersionInfoServlet.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/servlets/VersionInfoServlet.java b/core/src/main/java/org/apache/sling/cms/core/servlets/VersionInfoServlet.java
index 6b427cc..9de0824 100644
--- a/core/src/main/java/org/apache/sling/cms/core/servlets/VersionInfoServlet.java
+++ b/core/src/main/java/org/apache/sling/cms/core/servlets/VersionInfoServlet.java
@@ -44,7 +44,6 @@ import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
 import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.ConfigurationPolicy;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -77,6 +76,7 @@ public class VersionInfoServlet extends SlingSafeMethodsServlet {
 		}
 	}
 
+	@SuppressWarnings("deprecation")
 	private JsonObject getJsonObject(Resource resource) throws RepositoryException {
 		log.debug("Loading version history from {}", resource);
 		final JsonObjectBuilder result = Json.createObjectBuilder();


[sling-org-apache-sling-app-cms] 04/07: Moving the edit clientlibs to /static and fixing the z-index to display over top of bootstrap 4

Posted by dk...@apache.org.
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

commit b6e2d14de88f4400096f838981f9675d2d8745a9
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Jul 10 15:20:25 2018 -0400

    Moving the edit clientlibs to /static and fixing the z-index to display
    over top of bootstrap 4
---
 ui/src/main/frontend/src/scss/styles.scss          |  2 +-
 .../components/cms/pageeditbar/pageeditbar.jsp     |  2 +-
 .../components/editor/scripts/finalize.jsp         |  2 +-
 .../sling-cms/components/editor/scripts/init.jsp   |  2 +-
 ....sling.engine.impl.auth.SlingAuthenticator.json |  3 +-
 .../clientlibs/sling-cms-editor/editor.css         | 65 +++++++++++-----------
 .../clientlibs/sling-cms-editor/editor.js          |  0
 7 files changed, 37 insertions(+), 39 deletions(-)

diff --git a/ui/src/main/frontend/src/scss/styles.scss b/ui/src/main/frontend/src/scss/styles.scss
index ea893de..07cdca7 100644
--- a/ui/src/main/frontend/src/scss/styles.scss
+++ b/ui/src/main/frontend/src/scss/styles.scss
@@ -73,7 +73,7 @@ ul.Breadcrumb  {
 .Modal {
     display: none; 
     position: fixed; 
-    z-index: 1000; 
+    z-index: 1002; 
     left: 0;
     top: 0;
     width: 100%; 
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditbar/pageeditbar.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditbar/pageeditbar.jsp
index 191962c..f004a75 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditbar/pageeditbar.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pageeditbar/pageeditbar.jsp
@@ -17,7 +17,7 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-<link rel="stylesheet" href="/etc/clientlibs/sling-cms-editor/editor.css" />
+<link rel="stylesheet" href="/static/clientlibs/sling-cms-editor/editor.css" />
 <sling:call script="/libs/sling-cms/components/editor/scripts/init.jsp" />
 <div class="Sling-CMS__edit-bar">
 	<a href="/cms/start.html" target="_blank" class="Sling-CMS__component-title" target="Sling CMS">
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/finalize.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/finalize.jsp
index 8b97700..52cad1d 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/finalize.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/finalize.jsp
@@ -18,7 +18,7 @@
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
 <c:if test="${cmsEditEnabled == 'true'}">
-	<script src="/etc/clientlibs/sling-cms-editor/editor.js"></script>
+	<script src="/static/clientlibs/sling-cms-editor/editor.js"></script>
 	<div class="Sling-CMS__modal-background">
 		<div class="Sling-CMS__modal-box">
 			<div class="Sling-CMS__modal-frame-header">
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/init.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/init.jsp
index 60e51e3..1722b61 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/init.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/scripts/init.jsp
@@ -18,7 +18,7 @@
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
 <c:if test="${cmsEditEnabled == 'true'}">
-	<link rel="stylesheet" href="/etc/clientlibs/sling-cms-editor/editor.css" />
+	<link rel="stylesheet" href="/static/clientlibs/sling-cms-editor/editor.css" />
 	<c:if test="${not empty properties.availableTypes}">
 		<c:set var="availableTypes" value="${properties.availableTypes}" scope="request" />
 	</c:if>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.engine.impl.auth.SlingAuthenticator.json b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.engine.impl.auth.SlingAuthenticator.json
index 4e93201..9caf9e3 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.engine.impl.auth.SlingAuthenticator.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.engine.impl.auth.SlingAuthenticator.json
@@ -7,7 +7,6 @@
       "/apps",
       "/etc",
       "/home",
-      "/var",
-      "-/etc/clientlibs"
+      "/var"
     ]
 }
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/etc/clientlibs/sling-cms-editor/editor.css b/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.css
similarity index 70%
rename from ui/src/main/resources/jcr_root/etc/clientlibs/sling-cms-editor/editor.css
rename to ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.css
index 24d690b..5a84ba8 100644
--- a/ui/src/main/resources/jcr_root/etc/clientlibs/sling-cms-editor/editor.css
+++ b/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.css
@@ -15,10 +15,9 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */ 
-
+ */
 .Sling-CMS__component {
-	border: 1px solid rgba(0,0,0,0);
+	border: 1px solid rgba(0, 0, 0, 0);
 }
 
 .Sling-CMS__component:hover {
@@ -28,25 +27,24 @@
 .Sling-CMS__component-title {
 	padding: 0 10px;
 }
- 
- 
+
 .Sling-CMS__edit-bar {
 	width: 100%;
 	height: 38px;
 	padding: .2em;
 	background-color: silver;
-    line-height: 12px;
-    font-family: "Open Sans", arial, sans-serif;
+	line-height: 12px;
+	font-family: "Open Sans", arial, sans-serif;
 }
 
 .Sling-CMS__edit-button {
-    display: inline-block;
-    padding: 8px 12px;
-    color: white;
-    background-color: #00678c;
-    border: 0;
-    margin: .1em;
-    text-decoration: none;
+	display: inline-block;
+	padding: 8px 12px;
+	color: white;
+	background-color: #00678c;
+	border: 0;
+	margin: .1em;
+	text-decoration: none;
 }
 
 .Sling-CMS__logo {
@@ -54,25 +52,26 @@
 }
 
 .Sling-CMS__modal-background {
-    display: none; 
-    position: fixed; 
-    left: 0;
-    top: 0;
-    width: 100%; 
-    height: 100%; 
-    overflow: auto; 
-    background-color: rgb(0,0,0); 
-    background-color: rgba(0,0,0,0.3); 
+	display: none;
+	position: fixed;
+	left: 0;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	overflow: auto;
+	background-color: rgb(0, 0, 0);
+	background-color: rgba(0, 0, 0, 0.3);
+	z-index: 1001;
 }
 
 .Sling-CMS__modal-box {
-    background-color: white;
-    margin: 3em auto; 
-    padding: 2em;
-    border: 1px solid gray;
-    width: 85%;
-    z-index: 1;
-    max-width: 900px;
+	background-color: white;
+	margin: 3em auto;
+	padding: 2em;
+	border: 1px solid gray;
+	width: 85%;
+	z-index: 1001;
+	max-width: 900px;
 }
 
 .Sling-CMS__modal-frame-container {
@@ -84,7 +83,7 @@
 
 .Sling-CMS__modal-frame {
 	position: absolute;
-	top:0;
+	top: 0;
 	left: 0;
 	width: 100%;
 	height: 100%;
@@ -92,7 +91,7 @@
 }
 
 .Sling-CMS__modal-close {
-	float:right;
+	float: right;
 }
 
 .Sling-CMS__page-wrapper-frame {
@@ -108,5 +107,5 @@
 	padding: 0;
 	overflow: hidden;
 	z-index: 998;
-    padding-top: 8px;
+	padding-top: 8px;
 }
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/etc/clientlibs/sling-cms-editor/editor.js b/ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.js
similarity index 100%
rename from ui/src/main/resources/jcr_root/etc/clientlibs/sling-cms-editor/editor.js
rename to ui/src/main/resources/jcr_root/static/clientlibs/sling-cms-editor/editor.js


[sling-org-apache-sling-app-cms] 06/07: Adding support for User Generated Content

Posted by dk...@apache.org.
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

commit a9fdada31e4f6596f6cb81ecb57f551267aa88c1
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Jul 17 16:11:11 2018 -0400

    Adding support for User Generated Content
---
 builder/src/main/provisioning/cms.txt              |  16 ++
 .../java/org/apache/sling/cms/CMSConstants.java    |   5 +
 .../cms/core/usergenerated/UGCBucketConfig.java    |  87 +++++++++++
 .../usergenerated/UserGeneratedContentService.java |  53 +++++++
 .../usergenerated/impl/ApproveUGCOperation.java    | 119 +++++++++++++++
 .../impl/UserGeneratedContentConfig.java           |  35 +++++
 .../impl/UserGeneratedContentServiceImpl.java      | 123 +++++++++++++++
 .../main/resources/OSGI-INF/l10n/bundle.properties |  16 +-
 pom.xml                                            |  18 +--
 .../resources/SLING-INF/nodetypes/nodetypes.cnd    |  11 ++
 .../cms/suffixproperty/suffixproperty.jsp          |  25 +++
 .../jcr_root/libs/sling-cms/content/start.json     |  10 ++
 .../sling-cms/content/usergenerated/content.json   | 168 +++++++++++++++++++++
 .../sling-cms/content/usergenerated/review.json    |  83 ++++++++++
 14 files changed, 759 insertions(+), 10 deletions(-)

diff --git a/builder/src/main/provisioning/cms.txt b/builder/src/main/provisioning/cms.txt
index ca71f22..757b336 100644
--- a/builder/src/main/provisioning/cms.txt
+++ b/builder/src/main/provisioning/cms.txt
@@ -32,9 +32,25 @@
     set ACL for sling-rewriter
         allow   jcr:read    on /
     end
+    
+    create path (sling:OrderedFolder) /etc/usergenerated
+    set ACL for everyone
+        allow   jcr:read	on /etc/usergenerated
+    end
+    
+    # sling-ugc
+    create service user sling-ugc
+
+    set ACL for sling-ugc
+        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"
         ]
\ No newline at end of file
diff --git a/core/src/main/java/org/apache/sling/cms/CMSConstants.java b/core/src/main/java/org/apache/sling/cms/CMSConstants.java
index 3a77cef..dc62676 100644
--- a/core/src/main/java/org/apache/sling/cms/CMSConstants.java
+++ b/core/src/main/java/org/apache/sling/cms/CMSConstants.java
@@ -62,6 +62,11 @@ public class CMSConstants {
 	public static final String NT_SITE = NAMESPACE + ":Site";
 
 	/**
+	 * User Generated Content node type.
+	 */
+	public static final String NT_UGC = NAMESPACE + ":UGC";
+
+	/**
 	 * Description attribute name
 	 */
 	public static final String PN_DESCRIPTION = "jcr:description";
diff --git a/core/src/main/java/org/apache/sling/cms/core/usergenerated/UGCBucketConfig.java b/core/src/main/java/org/apache/sling/cms/core/usergenerated/UGCBucketConfig.java
new file mode 100644
index 0000000..1b3e962
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/usergenerated/UGCBucketConfig.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.usergenerated;
+
+import org.apache.sling.cms.core.usergenerated.UserGeneratedContentService.APPROVE_ACTION;
+import org.apache.sling.cms.core.usergenerated.UserGeneratedContentService.CONTENT_TYPE;
+
+/*
+ * Simple POJO for providing the required data for a UGC bucket
+ */
+public class UGCBucketConfig {
+
+	private CONTENT_TYPE contentType;
+	private int pathDepth = -1;
+	private String bucket;
+	private APPROVE_ACTION action;
+
+	/**
+	 * @return the contentType
+	 */
+	public CONTENT_TYPE getContentType() {
+		return contentType;
+	}
+
+	/**
+	 * @param contentType the contentType to set
+	 */
+	public void setContentType(CONTENT_TYPE contentType) {
+		this.contentType = contentType;
+	}
+
+	/**
+	 * @return the pathDepth
+	 */
+	public int getPathDepth() {
+		return pathDepth;
+	}
+
+	/**
+	 * @param pathDepth the pathDepth to set
+	 */
+	public void setPathDepth(int pathDepth) {
+		this.pathDepth = pathDepth;
+	}
+
+	/**
+	 * @return the bucket
+	 */
+	public String getBucket() {
+		return bucket;
+	}
+
+	/**
+	 * @param bucket the bucket to set
+	 */
+	public void setBucket(String bucket) {
+		this.bucket = bucket;
+	}
+
+	/**
+	 * @return the action
+	 */
+	public APPROVE_ACTION getAction() {
+		return action;
+	}
+
+	/**
+	 * @param action the action to set
+	 */
+	public void setAction(APPROVE_ACTION action) {
+		this.action = action;
+	}
+}
diff --git a/core/src/main/java/org/apache/sling/cms/core/usergenerated/UserGeneratedContentService.java b/core/src/main/java/org/apache/sling/cms/core/usergenerated/UserGeneratedContentService.java
new file mode 100644
index 0000000..062ebe9
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/usergenerated/UserGeneratedContentService.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.usergenerated;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.resource.PersistenceException;
+import org.apache.sling.api.resource.Resource;
+
+/**
+ * Service for creating User Generated Content
+ */
+public interface UserGeneratedContentService {
+
+	public enum APPROVE_ACTION {
+		move, publish
+	}
+
+	enum CONTENT_TYPE {
+		comment, forum_post, reply, blog_post, contact_form, signup, message, other
+	};
+
+	/**
+	 * Creates a new container for adding user generated content which should be
+	 * published when approvated. The UGC content should be added as a child of this
+	 * container.
+	 * 
+	 * @param request      the request for which this was initiated
+	 * @param bucketConfig the configuration for the UGC bucket
+	 * @param preview      the preview of the UGC to be displayed to the approving
+	 *                     user
+	 * @param targetPath   the path to which to move the content if this should be
+	 *                     moved when approved, may be null
+	 * @return the new UGC Container
+	 * @throws PersistenceException an exception occurs creating the UGC Container
+	 */
+	Resource createUGCContainer(SlingHttpServletRequest request, UGCBucketConfig bucketConfig, String preview,
+			String targetPath) throws PersistenceException;
+
+}
diff --git a/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/ApproveUGCOperation.java b/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/ApproveUGCOperation.java
new file mode 100644
index 0000000..975c63c
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/ApproveUGCOperation.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.usergenerated.impl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.jackrabbit.JcrConstants;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.resource.ModifiableValueMap;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceUtil;
+import org.apache.sling.cms.core.usergenerated.UserGeneratedContentService.APPROVE_ACTION;
+import org.apache.sling.jcr.resource.JcrResourceConstants;
+import org.apache.sling.servlets.post.Modification;
+import org.apache.sling.servlets.post.PostOperation;
+import org.apache.sling.servlets.post.PostResponse;
+import org.apache.sling.servlets.post.SlingPostProcessor;
+import org.osgi.service.component.annotations.Component;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The <code>ApproveUGCOperation</code> class will approve a piece of UGC,
+ * moving or publishing it as appropriate
+ */
+@Component(immediate = true, service = { PostOperation.class }, property = PostOperation.PROP_OPERATION_NAME
+		+ "=ugcapprove")
+public class ApproveUGCOperation implements PostOperation {
+
+	private static final Logger log = LoggerFactory.getLogger(ApproveUGCOperation.class);
+
+	@Override
+	public void run(SlingHttpServletRequest request, PostResponse response, SlingPostProcessor[] processors) {
+
+		log.trace("run");
+
+		try {
+			// calculate the paths
+			String path = request.getResource().getPath();
+			response.setPath(path);
+
+			log.debug("Approving UGC {}", path);
+
+			final List<Modification> changes = new ArrayList<>();
+			// perform the approval
+			String targetPath = request.getResource().getValueMap().get("targetpath", String.class);
+			APPROVE_ACTION action = APPROVE_ACTION
+					.valueOf(request.getResource().getValueMap().get("approveaction", String.class));
+			if (action == APPROVE_ACTION.move) {
+				ResourceUtil.getOrCreateResource(request.getResourceResolver(), targetPath, new HashMap<String, Object>() {
+					private static final long serialVersionUID = 1L;
+					{
+						put(JcrConstants.JCR_PRIMARYTYPE, JcrResourceConstants.NT_SLING_FOLDER);
+					}
+				}, JcrResourceConstants.NT_SLING_FOLDER, false);
+				for (Resource resource : request.getResource().getChildren()) {
+					log.debug("Moving {} to {}", resource.getPath(), targetPath);
+					changes.add(Modification.onMoved(resource.getPath(), targetPath));
+					request.getResourceResolver().move(resource.getPath(), targetPath);
+				}
+				changes.add(Modification.onDeleted(request.getResource().getPath()));
+				request.getResourceResolver().delete(request.getResource());
+			} else {
+				ModifiableValueMap mvm = request.getResource().adaptTo(ModifiableValueMap.class);
+				mvm.put("published", true);
+				changes.add(Modification.onModified(request.getResource().getPath()));
+			}
+
+			// invoke processors
+			if (processors != null) {
+				for (SlingPostProcessor processor : processors) {
+					processor.process(request, changes);
+				}
+			}
+
+			// check modifications for remaining postfix and store the base path
+			final Map<String, String> modificationSourcesContainingPostfix = new HashMap<>();
+			final Set<String> allModificationSources = new HashSet<>(changes.size());
+			for (final Modification modification : changes) {
+				final String source = modification.getSource();
+				if (source != null) {
+					allModificationSources.add(source);
+					final int atIndex = source.indexOf('@');
+					if (atIndex > 0) {
+						modificationSourcesContainingPostfix.put(source.substring(0, atIndex), source);
+					}
+				}
+			}
+			request.getResourceResolver().commit();
+
+		} catch (
+
+		Exception e) {
+			log.error("Exception during response processing.", e);
+			response.setError(e);
+
+		}
+	}
+}
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
new file mode 100644
index 0000000..049ce6d
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentConfig.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.usergenerated.impl;
+
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.AttributeType;
+
+/**
+ * Configuration for the User Generated Content handling service
+ */
+@ObjectClassDefinition(name = "%ugc.name", description = "%ugc.description", localization = "OSGI-INF/l10n/bundle")
+public @interface UserGeneratedContentConfig {
+
+	@AttributeDefinition(name = "%ugcRoot.name", description = "%ugcRoot.description", defaultValue = "/etc/usergenerated")
+	String ugcRoot();
+
+	@AttributeDefinition(name = "%defaultPathDepth.name", description = "%defaultPathDepth.description", type = AttributeType.INTEGER)
+	int defaultPathDepth() default 1;
+
+}
diff --git a/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentServiceImpl.java b/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentServiceImpl.java
new file mode 100644
index 0000000..f0be9c3
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/usergenerated/impl/UserGeneratedContentServiceImpl.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.usergenerated.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.jackrabbit.JcrConstants;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.resource.LoginException;
+import org.apache.sling.api.resource.PersistenceException;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.api.resource.ResourceUtil;
+import org.apache.sling.cms.CMSConstants;
+import org.apache.sling.cms.core.usergenerated.UGCBucketConfig;
+import org.apache.sling.cms.core.usergenerated.UserGeneratedContentService;
+import org.apache.sling.jcr.resource.JcrResourceConstants;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.metatype.annotations.Designate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component(service = UserGeneratedContentService.class)
+@Designate(ocd = UserGeneratedContentConfig.class)
+public class UserGeneratedContentServiceImpl implements UserGeneratedContentService {
+
+	private static final Logger log = LoggerFactory.getLogger(UserGeneratedContentServiceImpl.class);
+
+	@Reference
+	private ResourceResolverFactory factory;
+	private UserGeneratedContentConfig config;
+
+	private ResourceResolver serviceResolver;
+
+	@Activate
+	public void activate(UserGeneratedContentConfig config) throws LoginException {
+		this.config = config;
+
+		log.debug("Connecting with service user");
+		Map<String, Object> serviceParams = new HashMap<String, Object>();
+		serviceParams.put(ResourceResolverFactory.SUBSERVICE, "sling-ugc");
+		serviceResolver = factory.getServiceResourceResolver(serviceParams);
+	}
+
+	@Deactivate
+	public void deactivate() {
+		if (serviceResolver != null) {
+			serviceResolver.close();
+		}
+	}
+
+	@Override
+	public Resource createUGCContainer(SlingHttpServletRequest request, UGCBucketConfig bucketConfig, String preview,
+			String targetPath) throws PersistenceException {
+
+		serviceResolver.refresh();
+
+		Resource resource = null;
+
+		log.debug("Creating content of type {} in bucket {}", bucketConfig.getContentType().toString(),
+				bucketConfig.getBucket());
+		Map<String, Object> resourceProperties = new HashMap<String, Object>();
+		resourceProperties.put(JcrConstants.JCR_PRIMARYTYPE, CMSConstants.NT_UGC);
+		resourceProperties.put("approveaction", bucketConfig.getAction().toString());
+		resourceProperties.put("contenttype", bucketConfig.getContentType().toString());
+		resourceProperties.put("preview", preview);
+		resourceProperties.put("published", false);
+		resourceProperties.put("referrer", request.getHeader("referer"));
+		if (StringUtils.isNotBlank(targetPath)) {
+			resourceProperties.put("targetpath", targetPath);
+		}
+		resourceProperties.put("user", request.getResourceResolver().getUserID());
+		resourceProperties.put("useragent", request.getHeader("User-Agent"));
+		resourceProperties.put("userip", request.getRemoteAddr());
+
+		String contentPath = generatePath(bucketConfig);
+		log.debug("Creating article contents {}", contentPath);
+		resource = ResourceUtil.getOrCreateResource(serviceResolver, contentPath, resourceProperties,
+				JcrResourceConstants.NT_SLING_ORDERED_FOLDER, true);
+
+		return resource;
+	}
+
+	private String generatePath(UGCBucketConfig bucketConfig) {
+		String uuid = UUID.randomUUID().toString();
+		int depth = bucketConfig.getPathDepth();
+		if (depth == -1) {
+			depth = config.defaultPathDepth();
+		}
+		String[] pathSegments = new String[depth];
+		for (int i = 0; i < pathSegments.length; i++) {
+			pathSegments[i] = String.valueOf(uuid.charAt(i));
+		}
+		if (pathSegments.length > 0) {
+			return config.ugcRoot() + "/" + bucketConfig.getBucket() + "/" + StringUtils.join(pathSegments, "/") + "/"
+					+ uuid;
+		} else {
+			return config.ugcRoot() + "/" + bucketConfig.getBucket() + "/" + uuid;
+		}
+	}
+
+}
diff --git a/core/src/main/resources/OSGI-INF/l10n/bundle.properties b/core/src/main/resources/OSGI-INF/l10n/bundle.properties
index c35d1be..29359f2 100644
--- a/core/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/core/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -62,4 +62,18 @@ nodes when using the Property Name Hint Name Generator
 
 replacement.char.name=Replacement Character
 replacement.char.description=A character with which to replace any non-allowed \
-characters in the name 
\ No newline at end of file
+characters in the name 
+
+# User Generated Content
+ugc.name=User Generated Content
+ugc.description=Service for creating buckets of User Generated Content
+
+ugcRoot.name=UGC Root
+ugcRoot.description=The root resource under which the User Generated Content \
+should be saved
+
+defaultPathDepth.name=Default Path Depth
+defaultPathDepth.description=The default path depth for UGC content to be stored \
+under the bucket. This will be sliced off the UUID, so if you had a UUID of 123 \
+a bucket of bob and a path depth of 1, this would yield a path like: bob/1/123. \
+This can be overridden by the path depth in the UGCBucketConfig.
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index ccd3a75..2b49ce5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,15 +43,15 @@
 		<module>reference</module>
 		<module>builder</module>
 	</modules>
-	
-	
 
-    <scm>
-        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</connection>
-        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</developerConnection>
-        <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-app-cms.git</url>
-        <tag>HEAD</tag>
-    </scm>
+
+
+	<scm>
+		<connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</connection>
+		<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</developerConnection>
+		<url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-app-cms.git</url>
+		<tag>HEAD</tag>
+	</scm>
 
 	<dependencyManagement>
 		<dependencies>
@@ -70,7 +70,7 @@
 			<dependency>
 				<groupId>org.apache.sling</groupId>
 				<artifactId>org.apache.sling.api</artifactId>
-				<version>2.8.0</version>
+				<version>2.18.0</version>
 				<scope>provided</scope>
 			</dependency>
 			<dependency>
diff --git a/ui/src/main/resources/SLING-INF/nodetypes/nodetypes.cnd b/ui/src/main/resources/SLING-INF/nodetypes/nodetypes.cnd
index 8ce0cf1..a3d3731 100644
--- a/ui/src/main/resources/SLING-INF/nodetypes/nodetypes.cnd
+++ b/ui/src/main/resources/SLING-INF/nodetypes/nodetypes.cnd
@@ -74,3 +74,14 @@
 	- jcr:lastModifiedBy (string)
 	- jcr:title (string)
 	+ * (sling:Taxonomy) = sling:Taxonomy version
+
+[sling:UGC] > nt:unstructured
+    - approveaction (string)
+	- contenttype (string)
+	- finalpath (string)
+	- preview (string)
+	- published (boolean)
+	- referrer (string)
+	- user (string)
+	- useragent (string)
+	- userip (string)
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/suffixproperty/suffixproperty.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/suffixproperty/suffixproperty.jsp
new file mode 100644
index 0000000..5ed7d5c
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/suffixproperty/suffixproperty.jsp
@@ -0,0 +1,25 @@
+<%-- /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */ --%>
+ <%@include file="/libs/sling-cms/global.jsp"%>
+ <div>
+ 	<strong>
+ 		<sling:encode value="${properties.label}" mode="HTML" />:
+ 	</strong><br/>
+ 	<sling:encode value="${slingRequest.requestPathInfo.suffixResource.valueMap[properties.property]}" mode="HTML" />
+ </div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
index 30e3189..aac49ac 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
@@ -56,6 +56,16 @@
 				"query": "SELECT * FROM [sling:OrderedFolder] AS s WHERE ISCHILDNODE(s,'/conf') ORDER BY NAME()",
 				"title": "Configuration"
 			},
+			"usergeneratednav": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/contentnav",
+				"createPath": "/cms/folder/create.html/etc/usergenerated",
+				"createFolder": "Bucket",
+				"prefix": "/cms/usergenerated",
+				"itemPrefix": "/cms/usergenerated/content.html",
+				"query": "SELECT * FROM [sling:OrderedFolder] AS s WHERE ISCHILDNODE(s,'/etc/usergenerated') ORDER BY NAME()",
+				"title": "User Generated"
+			},
 			"toolsnav": {
 				"jcr:primaryType": "nt:unstructured",
 				"sling:resourceType": "sling-cms/components/cms/staticnav",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
new file mode 100644
index 0000000..77a21ea
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
@@ -0,0 +1,168 @@
+{
+	"jcr:primaryType": "sling:Page",
+	"jcr:content": {
+		"sling:resourceType": "sling-cms/components/pages/base",
+		"jcr:title": "User Generated Content",
+		"jcr:primaryType": "nt:unstructured",
+		"container": {
+			"jcr:primaryType": "nt:unstructured",
+			"sling:resourceType": "sling-cms/components/general/container",
+			"contentactions": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/contentactions",
+				"actions": {
+					"folder": {
+						"jcr:primaryType": "nt:unstructured",
+						"label": "Bucket",
+						"prefix": "/cms/folder/create.html"
+					}
+				}
+			},
+			"contentbreadcrumb": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
+				"depth": 2,
+				"prefix": "/cms/usergenerated/content.html",
+				"titleProp": "jcr:content/jcr:title"
+			},
+			"contenttable": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/contenttable",
+				"columns": {
+					"jcr:primaryType": "nt:unstructured",
+					"name": {
+						"jcr:primaryType": "nt:unstructured",
+						"title": "Name"
+					},
+					"title": {
+						"jcr:primaryType": "nt:unstructured",
+						"title": "Title"
+					},
+					"published": {
+						"jcr:primaryType": "nt:unstructured",
+						"title": "Published"
+					},
+					"type": {
+						"jcr:primaryType": "nt:unstructured",
+						"title": "Type"
+					},
+					"lastModified": {
+						"jcr:primaryType": "nt:unstructured",
+						"title": "Last Modified"
+					},
+					"actions": {
+						"jcr:primaryType": "nt:unstructured",
+						"title": "Actions"
+					}
+				},
+				"types": {
+					"jcr:primaryType": "nt:unstructured",
+					"sling:UGC":{
+						"jcr:primaryType": "nt:unstructured",
+						"columns": {
+							"jcr:primaryType": "nt:unstructured",
+							"name": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/name"
+							},
+							"title": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/text",
+								"property": "jcr:content/jcr:title",
+								"type": "String"
+							},
+							"publish": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/publish"
+							},
+							"type": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/static",
+								"value": "UGC"
+							},
+							"lastModified": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified"
+							},
+							"actions": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/actions",
+								"edit": {
+									"jcr:primaryType": "nt:unstructured",
+									"modal": false,
+									"title": "Review User Generated Content",
+									"text": "&#x270f;",
+									"prefix": "/cms/usergenerated/review.html"
+								},
+								"delete": {
+									"jcr:primaryType": "nt:unstructured",
+									"modal": true,
+									"title": "Delete User Generated Content",
+									"text": "&times;",
+									"prefix": "/cms/shared/delete.html"
+								}
+							}
+						}
+					},
+					"sling:OrderedFolder":{
+						"jcr:primaryType": "nt:unstructured",
+						"columns": {
+							"jcr:primaryType": "nt:unstructured",
+							"name": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/name",
+								"link": true,
+								"prefix": "/cms/usergenerated/content.html"
+							},
+							"title": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/text",
+								"property": "jcr:content/jcr:title",
+								"type": "String"
+							},
+							"publish": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/publish"
+							},
+							"type": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/static",
+								"value": "Folder"
+							},
+							"lastModified": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
+								"subPath": "jcr:content/"
+							},
+							"actions": {
+								"jcr:primaryType": "nt:unstructured",
+								"sling:resourceType": "sling-cms/components/cms/columns/actions",
+								"edit": {
+									"jcr:primaryType": "nt:unstructured",
+									"modal": true,
+									"title": "Edit Folder",
+									"text": "&#x270f;",
+									"prefix": "/cms/folder/edit.html"
+								},
+								"movecopy": {
+									"jcr:primaryType": "nt:unstructured",
+									"modal": true,
+									"title": "Move / Copy Folder",
+									"text": "&#x21c6;",
+									"prefix": "/cms/shared/movecopy.html"
+								},
+								"delete": {
+									"jcr:primaryType": "nt:unstructured",
+									"title": "Delete Folder",
+									"text": "&times;",
+									"prefix": "/cms/shared/delete.html",
+									"modal": true
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/review.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/review.json
new file mode 100644
index 0000000..7ef5836
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/review.json
@@ -0,0 +1,83 @@
+{
+	"jcr:primaryType": "sling:Page",
+	"jcr:content": {
+		"sling:resourceType": "sling-cms/components/pages/base",
+		"jcr:title": "Review User Generated Content",
+		"jcr:primaryType": "nt:unstructured",
+		"container": {
+			"jcr:primaryType": "nt:unstructured",
+			"sling:resourceType": "sling-cms/components/general/container",
+			"richtext": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/general/richtext",
+				"text": "<h3>Review User Generated Content</h3>"
+			},
+			"preview": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/suffixproperty",
+				"label": "Preview",
+				"property": "preview"
+			},
+			"contenttype": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/suffixproperty",
+				"label": "Content Type",
+				"property": "contenttype"
+			},
+			"referrer": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/suffixproperty",
+				"label": "Referrer",
+				"property": "referrer"
+			},
+			"user": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/suffixproperty",
+				"label": "User",
+				"property": "user"
+			},
+			"useragent": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/suffixproperty",
+				"label": "User Agent",
+				"property": "useragent"
+			},
+			"userip": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/cms/suffixproperty",
+				"label": "User IP",
+				"property": "userip"
+			},
+			"slingform": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/editor/slingform",
+				"button": "Approve Content",
+				"fields": {
+					"jcr:primaryType": "nt:unstructured",
+					"sling:resourceType": "sling-cms/components/general/container",
+					"title": {
+						"jcr:primaryType": "nt:unstructured",
+						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
+						"name": ":operation",
+						"value": "ugcapprove"
+					}
+				}
+			},
+			"deleteform": {
+				"jcr:primaryType": "nt:unstructured",
+				"sling:resourceType": "sling-cms/components/editor/slingform",
+				"button": "Delete Content",
+				"fields": {
+					"jcr:primaryType": "nt:unstructured",
+					"sling:resourceType": "sling-cms/components/general/container",
+					"title": {
+						"jcr:primaryType": "nt:unstructured",
+						"sling:resourceType": "sling-cms/components/editor/fields/hidden",
+						"name": ":operation",
+						"value": "delete"
+					}
+				}
+			}
+		}
+	}
+}
\ No newline at end of file


[sling-org-apache-sling-app-cms] 02/07: Fixing a too common error with the site object and a path problem for selinux

Posted by dk...@apache.org.
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

commit 49b10cf40f172d219dad0f94f19383301422c1b5
Author: Dan Klco <dk...@apache.org>
AuthorDate: Wed Jul 4 07:53:13 2018 -0400

    Fixing a too common error with the site object and a path problem for
    selinux
---
 core/src/main/java/org/apache/sling/cms/core/models/Site.java | 1 +
 vagrant/Vagrantfile                                           | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/models/Site.java b/core/src/main/java/org/apache/sling/cms/core/models/Site.java
index 80ab164..a459cfe 100644
--- a/core/src/main/java/org/apache/sling/cms/core/models/Site.java
+++ b/core/src/main/java/org/apache/sling/cms/core/models/Site.java
@@ -56,6 +56,7 @@ public class Site {
 
 	@Inject
 	@Named(PN_CONFIG)
+	@Optional
 	private String config;
 
 	@Inject
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index 9c5c3e6..2f3b88d 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -27,11 +27,11 @@ Vagrant.configure("2") do |config|
      echo "Depedencies installed..."
 
      setenforce 0
-     cp selinux /etc/sysconfig/selinux
+     cp /vagrant_data/selinux /etc/sysconfig
      echo "SELinux Disabled..."
 
      mkdir -p /opt/sling
-     wget https://repository.apache.org/content/repositories/snapshots/org/apache/sling/org.apache.sling.cms.builder/1.0.0-SNAPSHOT/org.apache.sling.cms.builder-1.0.0-20180627.025154-15.jar -O /opt/sling/org.apache.sling.cms-1.0.0.jar
+     wget https://repository.apache.org/content/repositories/snapshots/org/apache/sling/org.apache.sling.cms.builder/1.0.0-SNAPSHOT/org.apache.sling.cms.builder-1.0.0-20180628.191007-27.jar -O /opt/sling/org.apache.sling.cms-1.0.0.jar
      cp /vagrant_data/start.sh /opt/sling
      cp /vagrant_data/stop.sh /opt/sling
      chmod +x /opt/sling/*.sh


[sling-org-apache-sling-app-cms] 03/07: Fixed to return the correct status code

Posted by dk...@apache.org.
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

commit 75bfb32cc5a16b52d478def7324f0d42556cbc0d
Author: Dan Klco <dk...@apache.org>
AuthorDate: Mon Jul 9 12:59:04 2018 -0400

    Fixed to return the correct status code
---
 core/src/main/java/org/apache/sling/cms/core/models/ErrorHandler.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/models/ErrorHandler.java b/core/src/main/java/org/apache/sling/cms/core/models/ErrorHandler.java
index 6d470ce..83acfe7 100644
--- a/core/src/main/java/org/apache/sling/cms/core/models/ErrorHandler.java
+++ b/core/src/main/java/org/apache/sling/cms/core/models/ErrorHandler.java
@@ -107,7 +107,7 @@ public class ErrorHandler {
 		}
 		
 		log.debug("Sending error {}",errorCode);
-		response.sendError(errorCode);
+		response.setStatus(errorCode);
 		
 		log.debug("Error handler initialized successfully!");
 	}


[sling-org-apache-sling-app-cms] 07/07: Merging latest changes

Posted by dk...@apache.org.
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

commit 7158c9f80c71571b0e03a596558d46a30f0a3552
Merge: fdd7f0e a9fdada
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Jul 17 16:12:12 2018 -0400

    Merging latest changes

 builder/src/main/provisioning/cms.txt              |  16 ++
 .../java/org/apache/sling/cms/CMSConstants.java    |   5 +
 .../apache/sling/cms/core/models/ErrorHandler.java |   2 +-
 .../org/apache/sling/cms/core/models/Site.java     |   1 +
 .../cms/core/servlets/VersionInfoServlet.java      |   2 +-
 .../cms/core/usergenerated/UGCBucketConfig.java    |  87 +++++++++++
 .../usergenerated/UserGeneratedContentService.java |  53 +++++++
 .../usergenerated/impl/ApproveUGCOperation.java    | 119 +++++++++++++++
 .../impl/UserGeneratedContentConfig.java           |  35 +++++
 .../impl/UserGeneratedContentServiceImpl.java      | 123 +++++++++++++++
 .../main/resources/OSGI-INF/l10n/bundle.properties |  16 +-
 pom.xml                                            |  16 +-
 ui/src/main/frontend/src/scss/styles.scss          |   2 +-
 .../resources/SLING-INF/nodetypes/nodetypes.cnd    |  11 ++
 .../components/cms/pageeditbar/pageeditbar.jsp     |   2 +-
 .../suffixproperty/suffixproperty.jsp}             |  12 +-
 .../components/editor/scripts/finalize.jsp         |   2 +-
 .../sling-cms/components/editor/scripts/init.jsp   |   2 +-
 .../jcr_root/libs/sling-cms/content/start.json     |  10 ++
 .../sling-cms/content/usergenerated/content.json   | 168 +++++++++++++++++++++
 .../sling-cms/content/usergenerated/review.json    |  83 ++++++++++
 ....sling.engine.impl.auth.SlingAuthenticator.json |   3 +-
 .../clientlibs/sling-cms-editor/editor.css         |  65 ++++----
 .../clientlibs/sling-cms-editor/editor.js          |   0
 vagrant/Vagrantfile                                |   4 +-
 25 files changed, 780 insertions(+), 59 deletions(-)

diff --cc pom.xml
index d8bc94c,2b49ce5..b79e319
--- a/pom.xml
+++ b/pom.xml
@@@ -41,15 -43,15 +41,13 @@@
  		<module>reference</module>
  		<module>builder</module>
  	</modules>
- 	
- 	
  
-     <scm>
-         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</connection>
-         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</developerConnection>
-         <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-app-cms.git</url>
-         <tag>org.apache.sling.cms-0.9.0</tag>
-     </scm>
 -
 -
+ 	<scm>
+ 		<connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</connection>
+ 		<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</developerConnection>
+ 		<url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-app-cms.git</url>
+ 		<tag>HEAD</tag>
+ 	</scm>
  
  	<dependencyManagement>
  		<dependencies>


[sling-org-apache-sling-app-cms] 01/07: [maven-release-plugin] prepare release org.apache.sling.cms-0.9.0

Posted by dk...@apache.org.
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

commit fdd7f0ee00c7dc4ddb0b68aae3aef664ad5bf32d
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Jun 28 15:18:31 2018 -0400

    [maven-release-plugin] prepare release org.apache.sling.cms-0.9.0
---
 builder/pom.xml   | 4 ++--
 core/pom.xml      | 6 ++----
 pom.xml           | 8 +++-----
 reference/pom.xml | 8 +++-----
 ui/pom.xml        | 5 ++---
 5 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/builder/pom.xml b/builder/pom.xml
index a930e5d..ab7aaf7 100644
--- a/builder/pom.xml
+++ b/builder/pom.xml
@@ -16,12 +16,12 @@
     <parent>
         <artifactId>org.apache.sling.cms</artifactId>
         <groupId>org.apache.sling</groupId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>0.9.0</version>
     </parent>
 
     <artifactId>org.apache.sling.cms.builder</artifactId>
     <packaging>slingstart</packaging>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>0.9.0</version>
 
     <name>Apache Sling - CMS Application Builder</name>
 
diff --git a/core/pom.xml b/core/pom.xml
index e9b554c..04b4a82 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -9,14 +9,12 @@
 	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
 	OF ANY KIND, either express or implied. See the License for the specific 
 	language governing permissions and limitations under the License. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<artifactId>org.apache.sling.cms</artifactId>
 		<groupId>org.apache.sling</groupId>
-		<version>1.0.0-SNAPSHOT</version>
+		<version>0.9.0</version>
 	</parent>
 	<artifactId>org.apache.sling.cms.core</artifactId>
 	<packaging>bundle</packaging>
diff --git a/pom.xml b/pom.xml
index ccd3a75..d8bc94c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,9 +9,7 @@
 	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
 	OF ANY KIND, either express or implied. See the License for the specific 
 	language governing permissions and limitations under the License. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<groupId>org.apache.sling</groupId>
@@ -22,7 +20,7 @@
 
 	<artifactId>org.apache.sling.cms</artifactId>
 	<name>Apache Sling - CMS</name>
-	<version>1.0.0-SNAPSHOT</version>
+	<version>0.9.0</version>
 	<packaging>pom</packaging>
 
 	<properties>
@@ -50,7 +48,7 @@
         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git</developerConnection>
         <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-app-cms.git</url>
-        <tag>HEAD</tag>
+        <tag>org.apache.sling.cms-0.9.0</tag>
     </scm>
 
 	<dependencyManagement>
diff --git a/reference/pom.xml b/reference/pom.xml
index 800a101..a891555 100644
--- a/reference/pom.xml
+++ b/reference/pom.xml
@@ -9,14 +9,12 @@
 	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
 	OF ANY KIND, either express or implied. See the License for the specific 
 	language governing permissions and limitations under the License. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<artifactId>org.apache.sling.cms</artifactId>
 		<groupId>org.apache.sling</groupId>
-		<version>1.0.0-SNAPSHOT</version>
+		<version>0.9.0</version>
 	</parent>
 	<artifactId>org.apache.sling.cms.reference</artifactId>
 	<packaging>bundle</packaging>
@@ -70,7 +68,7 @@
 		<dependency>
 			<groupId>org.apache.sling</groupId>
 			<artifactId>org.apache.sling.cms.core</artifactId>
-			<version>1.0.0-SNAPSHOT</version>
+			<version>0.9.0</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.geronimo.specs</groupId>
diff --git a/ui/pom.xml b/ui/pom.xml
index a502b93..947eb44 100644
--- a/ui/pom.xml
+++ b/ui/pom.xml
@@ -9,13 +9,12 @@
 	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
 	OF ANY KIND, either express or implied. See the License for the specific 
 	language governing permissions and limitations under the License. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<artifactId>org.apache.sling.cms</artifactId>
 		<groupId>org.apache.sling</groupId>
-		<version>1.0.0-SNAPSHOT</version>
+		<version>0.9.0</version>
 	</parent>
 	<artifactId>org.apache.sling.cms.ui</artifactId>
 	<packaging>bundle</packaging>