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 2019/10/22 14:05:12 UTC

[sling-org-apache-sling-app-cms] branch master updated (0d90273 -> 4725823)

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 0d90273  Fixing SLING-8795 - Adding a form action for creating User Generated Content
     new 51dc4fd  Minor - syncing dependency versions from Sling App to poms
     new 4725823  Abstracting the "taxonomy" field out to a more generic label field which can be used for different use cases

The 2 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:
 api/pom.xml                                        |  8 ++-
 .../java/org/apache/sling/cms/CMSConstants.java    |  2 +-
 core/pom.xml                                       | 12 ++--
 .../core/internal/filters/CMSSecurityFilter.java   | 61 +++++++++++-------
 .../usergenerated/impl/ApproveUGCOperation.java    |  2 +-
 .../impl/UserGeneratedContentServiceImpl.java      |  2 +-
 pom.xml                                            | 72 +++++++++++-----------
 ui/src/main/frontend/js/cms.taxonomy.js            | 20 +++---
 .../fields/{richtext.json => labelfield.json}      |  2 +-
 .../components/editor/fields/labelfield/field.jsp  | 47 ++++++++++++++
 .../fields/labelfield/options.jsp}                 |  2 +-
 .../fields/labelfield/values.jsp}                  |  2 +-
 .../components/editor/fields/taxonomy.json         |  2 +-
 .../components/editor/fields/taxonomy/field.jsp    | 62 -------------------
 .../buttongroup.jsp => taxonomy/options.jsp}       | 10 +--
 .../components/editor/fields/taxonomy/values.jsp   | 15 +++--
 16 files changed, 169 insertions(+), 152 deletions(-)
 copy ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/{richtext.json => labelfield.json} (64%)
 create mode 100644 ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/field.jsp
 copy ui/src/main/resources/jcr_root/libs/sling-cms/components/{general/richtext/richtext.jsp => editor/fields/labelfield/options.jsp} (96%)
 copy ui/src/main/resources/jcr_root/libs/sling-cms/components/{general/richtext/richtext.jsp => editor/fields/labelfield/values.jsp} (94%)
 delete mode 100644 ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/field.jsp
 copy ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/{richtext/toolbar/buttongroup/buttongroup.jsp => taxonomy/options.jsp} (60%)
 copy archetype/src/main/resources/archetype-resources/src/main/resources/jcr_root/apps/__appName__/components/page/head.jsp => ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/values.jsp (70%)


[sling-org-apache-sling-app-cms] 02/02: Abstracting the "taxonomy" field out to a more generic label field which can be used for different use cases

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 4725823f4d275a5193309fb50629a3d5a848e481
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Oct 22 10:04:05 2019 -0400

    Abstracting the "taxonomy" field out to a more generic label field which
    can be used for different use cases
---
 ui/src/main/frontend/js/cms.taxonomy.js            | 20 +++----
 .../components/editor/fields/labelfield.json       |  4 ++
 .../components/editor/fields/labelfield/field.jsp  | 47 ++++++++++++++++
 .../editor/fields/labelfield/options.jsp           | 20 +++++++
 .../components/editor/fields/labelfield/values.jsp | 20 +++++++
 .../components/editor/fields/taxonomy.json         |  2 +-
 .../components/editor/fields/taxonomy/field.jsp    | 62 ----------------------
 .../components/editor/fields/taxonomy/options.jsp  | 26 +++++++++
 .../components/editor/fields/taxonomy/values.jsp   | 28 ++++++++++
 9 files changed, 156 insertions(+), 73 deletions(-)

diff --git a/ui/src/main/frontend/js/cms.taxonomy.js b/ui/src/main/frontend/js/cms.taxonomy.js
index 5687368..c4f4445 100644
--- a/ui/src/main/frontend/js/cms.taxonomy.js
+++ b/ui/src/main/frontend/js/cms.taxonomy.js
@@ -19,19 +19,19 @@
 /* eslint-env browser, es6 */
 (function (rava) {
     'use strict';
-    rava.bind('.taxonomy', {
+    rava.bind('.labelfield', {
         events: {
-            '.taxonomy__add, .taxonomy__add *': {
+            '.labelfield__add, .labelfield__add *': {
                 click: function (event) {
                     event.preventDefault();
                     event.stopPropagation();
                     var context = this,
                         span = document.createElement('span'),
-                        val = context.querySelector('.taxonomy__field input').value,
+                        val = context.querySelector('.labelfield__field input').value,
                         found = false,
                         title = context.querySelector('option[value="' + val + '"]').innerText;
-                    span.innerHTML = context.querySelector('.taxonomy__template').innerHTML;
-                    context.querySelectorAll('.taxonomy__item input').forEach(function (el) {
+                    span.innerHTML = context.querySelector('.labelfield__template').innerHTML;
+                    context.querySelectorAll('.labelfield__item input').forEach(function (el) {
                         if (el.value === val) {
                             found = true;
                         }
@@ -42,21 +42,21 @@
                     span.querySelector('input').value = val;
 
                     if (title !== '') {
-                        span.querySelector('.taxonomy__title').innerText = title;
-                        this.closest('.taxonomy').querySelector('.taxonomy__container').appendChild(span);
-                        context.querySelector('.taxonomy__field input').value = '';
+                        span.querySelector('.labelfield__title').innerText = title;
+                        this.closest('.labelfield').querySelector('.labelfield__container').appendChild(span);
+                        context.querySelector('.labelfield__field input').value = '';
                     }
                 }
             }
         }
     });
 
-    rava.bind('.taxonomy__item, .taxonomy__item *', {
+    rava.bind('.labelfield__item, .labelfield__item *', {
         events: {
             click: function () {
                 event.preventDefault();
                 event.stopPropagation();
-                this.closest('.taxonomy__item').remove();
+                this.closest('.labelfield__item').remove();
             }
         }
     });
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield.json
new file mode 100644
index 0000000..747e8fd
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield.json
@@ -0,0 +1,4 @@
+{
+	"jcr:primaryType": "nt:unstructured",
+	"sling:resourceSuperType" : "sling-cms/components/editor/fields/base"
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/field.jsp
new file mode 100644
index 0000000..d21b132
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/field.jsp
@@ -0,0 +1,47 @@
+<%-- /*
+ * 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 class="labelfield">
+     <fieldset disabled="disabled" class="labelfield__template is-hidden">
+         <a class="button labelfield__item">
+            <input type="hidden" name="${properties.name}" value="" />
+            <span class="labelfield__title">
+            </span>
+            <span class="jam jam-close"></span>
+        </a>
+    </fieldset>
+    <div class="labelfield__field field has-addons">
+        <div class="control is-expanded">
+             <input class="input" type="text" ${required} ${disabled} id="${properties.name}" list="labelfield-${fn:replace(resource.name,':','-')}" autocomplete="off" />
+         </div>
+         <div class="control">
+             <button class="labelfield__add button">
+                 <span class="jam jam-plus">
+                    <span class="is-vhidden">
+                        Add
+                    </span>
+                 </span>
+             </button>
+         </div>
+     </div>
+     <div class="labelfield__container">
+         <sling:call script="values.jsp" />
+     </div>
+    <sling:call script="options" />
+</div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/options.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/options.jsp
new file mode 100644
index 0000000..60ace42
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/options.jsp
@@ -0,0 +1,20 @@
+<%-- /*
+ * 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"%>
+ <%-- Load the options --%>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/values.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/values.jsp
new file mode 100644
index 0000000..2ae2730
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/labelfield/values.jsp
@@ -0,0 +1,20 @@
+<%-- /*
+ * 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"%>
+ <%-- Load the values for the current field --%>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy.json
index f42ffde..782a403 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy.json
@@ -1,6 +1,6 @@
 {
 	"jcr:primaryType": "sling:Component",
-	"sling:resourceSuperType" : "sling-cms/components/editor/fields/base",
+	"sling:resourceSuperType" : "sling-cms/components/editor/fields/labelfield",
     "componentType": "SlingCMS-FieldConfig",
     "jcr:title": "Sling CMS - Taxonomy Field"
 }
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/field.jsp
deleted file mode 100644
index c82bb68..0000000
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/field.jsp
+++ /dev/null
@@ -1,62 +0,0 @@
-<%-- /*
- * 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 class="taxonomy">
-     <fieldset disabled="disabled" class="taxonomy__template is-hidden">
-         <a class="button taxonomy__item">
-            <input type="hidden" name="${properties.name}" value="" />
-            <span class="taxonomy__title">
-            </span>
-            <span class="jam jam-close"></span>
-        </a>
-     </fieldset>
-    <div class="taxonomy__field field has-addons">
-        <div class="control is-expanded">
-             <input class="input" type="text" ${required} ${disabled} id="${properties.name}" list="taxonomy-${fn:replace(resource.name,':','-')}" autocomplete="off" />
-         </div>
-         <div class="control">
-             <button class="taxonomy__add button">
-                 <span class="jam jam-plus">
-                    <span class="is-vhidden">
-                        Add
-                    </span>
-                 </span>
-             </button>
-         </div>
-     </div>
-     <div class="taxonomy__container">
-         <c:forEach var="item" items="${value}">
-             <a class="button taxonomy__item">
-                 <input type="hidden" name="${properties.name}" value="${item}" />
-                 <span class="taxonomy__title">
-                     ${sling:encode(sling:getResource(resourceResolver,item).valueMap['jcr:title'],'HTML')}
-                 </span>
-                 <span class="jam jam-close"></span>
-             </a>
-         </c:forEach>
-     </div>
-     
-    <sling:getCAConfigResource resource="${slingRequest.requestPathInfo.suffixResource}" bucket="site" name="settings" var="sitesettings" />
-    <datalist id="taxonomy-${fn:replace(resource.name,':','-')}">
-        <c:set var="query" value="SELECT * FROM [sling:Taxonomy] WHERE ISDESCENDANTNODE([${not empty properties.basePath ? properties.basePath : sitesettings.valueMap.taxonomyroot}])" />
-        <c:forEach var="taxonomy" items="${sling:findResources(resourceResolver,query,'JCR-SQL2')}">
-            <option value="${taxonomy.path}">${taxonomy.valueMap['jcr:title']}</option>
-        </c:forEach>
-    </datalist>
-</div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/options.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/options.jsp
new file mode 100644
index 0000000..0a99d81
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/options.jsp
@@ -0,0 +1,26 @@
+<%-- /*
+ * 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"%>
+<sling:getCAConfigResource resource="${slingRequest.requestPathInfo.suffixResource}" bucket="site" name="settings" var="sitesettings" />
+<datalist id="taxonomy-${fn:replace(resource.name,':','-')}">
+    <c:set var="query" value="SELECT * FROM [sling:Taxonomy] WHERE ISDESCENDANTNODE([${not empty properties.basePath ? properties.basePath : sitesettings.valueMap.taxonomyroot}])" />
+    <c:forEach var="taxonomy" items="${sling:findResources(resourceResolver,query,'JCR-SQL2')}">
+        <option value="${taxonomy.path}">${taxonomy.valueMap['jcr:title']}</option>
+    </c:forEach>
+</datalist>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/values.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/values.jsp
new file mode 100644
index 0000000..a1e0b40
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/values.jsp
@@ -0,0 +1,28 @@
+<%-- /*
+ * 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"%>
+<c:forEach var="item" items="${value}">
+    <a class="button taxonomy__item">
+        <input type="hidden" name="${properties.name}" value="${item}" />
+        <span class="taxonomy__title">
+            ${sling:encode(sling:getResource(resourceResolver,item).valueMap['jcr:title'],'HTML')}
+        </span>
+        <span class="jam jam-close"></span>
+    </a>
+</c:forEach>
\ No newline at end of file


[sling-org-apache-sling-app-cms] 01/02: Minor - syncing dependency versions from Sling App to poms

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 51dc4fd55c285f3a35dc70a9103903982b270ac9
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue Oct 22 10:02:41 2019 -0400

    Minor - syncing dependency versions from Sling App to poms
---
 api/pom.xml                                        |  8 ++-
 .../java/org/apache/sling/cms/CMSConstants.java    |  2 +-
 core/pom.xml                                       | 12 ++--
 .../core/internal/filters/CMSSecurityFilter.java   | 61 +++++++++++-------
 .../usergenerated/impl/ApproveUGCOperation.java    |  2 +-
 .../impl/UserGeneratedContentServiceImpl.java      |  2 +-
 pom.xml                                            | 72 +++++++++++-----------
 7 files changed, 93 insertions(+), 66 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index cdd8106..af0a45d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,9 @@
     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. -->
-<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>
@@ -75,6 +77,10 @@
             <artifactId>servlet-api</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit-api</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
         </dependency>
diff --git a/api/src/main/java/org/apache/sling/cms/CMSConstants.java b/api/src/main/java/org/apache/sling/cms/CMSConstants.java
index 58416f7..044d1cb 100644
--- a/api/src/main/java/org/apache/sling/cms/CMSConstants.java
+++ b/api/src/main/java/org/apache/sling/cms/CMSConstants.java
@@ -17,7 +17,7 @@
 package org.apache.sling.cms;
 
 import org.apache.jackrabbit.JcrConstants;
-import org.apache.sling.jcr.resource.JcrResourceConstants;
+import org.apache.sling.jcr.resource.api.JcrResourceConstants;
 
 /**
  * Constants used throughout the Sling CMS
diff --git a/core/pom.xml b/core/pom.xml
index 01ff742..0979634 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -4,7 +4,9 @@
     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. -->
-<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>
@@ -182,10 +184,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.jcr.base</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.commons.johnzon</artifactId>
         </dependency>
         <dependency>
@@ -267,5 +265,9 @@
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.commons.classloader</artifactId>
         </dependency>
+        <dependency>
+            <artifactId>oak-jcr</artifactId>
+            <groupId>org.apache.jackrabbit</groupId>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/filters/CMSSecurityFilter.java b/core/src/main/java/org/apache/sling/cms/core/internal/filters/CMSSecurityFilter.java
index 6c2a433..97cf1ee 100644
--- a/core/src/main/java/org/apache/sling/cms/core/internal/filters/CMSSecurityFilter.java
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/filters/CMSSecurityFilter.java
@@ -23,6 +23,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.regex.Pattern;
 
+import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
@@ -34,12 +35,12 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.jackrabbit.api.JackrabbitSession;
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.jackrabbit.api.security.user.User;
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.ConfigurationPolicy;
@@ -107,26 +108,7 @@ public class CMSSecurityFilter implements Filter {
 
                 // check to see if the user is a member of the specified group
                 if (StringUtils.isNotBlank(config.group())) {
-                    Authorizable auth;
-                    try {
-                        Session session = slingRequest.getResourceResolver().adaptTo(Session.class);
-                        UserManager userManager = AccessControlUtil.getUserManager(session);
-                        log.trace("Retrieved user manager {} with session {}", userManager, session);
-                        auth = userManager.getAuthorizable(slingRequest.getUserPrincipal());
-                        if (auth != null) {
-                            log.trace("Checking to see if user {} is in required group {}", auth.getID(),
-                                    config.group());
-                            Iterator<Group> groups = ((User) auth).memberOf();
-                            while (groups.hasNext()) {
-                                if (groups.next().getID().equals(config.group())) {
-                                    allowed = true;
-                                    break;
-                                }
-                            }
-                        }
-                    } catch (Exception e) {
-                        log.error("Exception determing group membership", e);
-                    }
+                    allowed = checkGroupMembership(slingRequest);
 
                     // just check to make sure the user is logged in
                 } else {
@@ -151,6 +133,43 @@ public class CMSSecurityFilter implements Filter {
         chain.doFilter(request, response);
     }
 
+    private boolean checkGroupMembership(SlingHttpServletRequest slingRequest) {
+        boolean allowed = false;
+        try {
+            Session session = slingRequest.getResourceResolver().adaptTo(Session.class);
+            UserManager userManager = null;
+            if (session instanceof JackrabbitSession) {
+                userManager = ((JackrabbitSession) session).getUserManager();
+            }
+            if (userManager == null) {
+                log.warn("Unable to retrieve user manager");
+                return false;
+            }
+            log.trace("Retrieved user manager {} with session {}", userManager, session);
+            Authorizable auth;
+
+            auth = userManager.getAuthorizable(slingRequest.getUserPrincipal());
+            if (auth == null) {
+                log.warn("Unable to retrieve user from principal {}", slingRequest.getUserPrincipal());
+                return false;
+            }
+
+            log.trace("Checking to see if user {} is in required group {}", auth.getID(), config.group());
+            Iterator<Group> groups = ((User) auth).memberOf();
+            while (groups.hasNext()) {
+                if (groups.next().getID().equals(config.group())) {
+                    allowed = true;
+                    break;
+                }
+            }
+
+        } catch (RepositoryException e) {
+            log.error("Unexpected exception checking group membership", e);
+            return false;
+        }
+        return allowed;
+    }
+
     @Override
     public void destroy() {
         // Nothing required
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
index af3072d..f18efe5 100644
--- 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
@@ -30,7 +30,7 @@ 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.usergenerated.UserGeneratedContentService.APPROVE_ACTION;
-import org.apache.sling.jcr.resource.JcrResourceConstants;
+import org.apache.sling.jcr.resource.api.JcrResourceConstants;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.PostOperation;
 import org.apache.sling.servlets.post.PostResponse;
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
index 9c4d536..f5fd28d 100644
--- 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
@@ -32,7 +32,7 @@ import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.cms.CMSConstants;
 import org.apache.sling.cms.usergenerated.UGCBucketConfig;
 import org.apache.sling.cms.usergenerated.UserGeneratedContentService;
-import org.apache.sling.jcr.resource.JcrResourceConstants;
+import org.apache.sling.jcr.resource.api.JcrResourceConstants;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
diff --git a/pom.xml b/pom.xml
index b9ab0f8..c941211 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- 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
+<!-- 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. -->
 <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"
@@ -58,19 +58,13 @@
             <dependency>
                 <groupId>org.apache.cocoon</groupId>
                 <artifactId>cocoon-serializers-charsets</artifactId>
-                <version>1.0.2</version>
-                <scope>provided</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.commons</groupId>
-                <artifactId>commons-math</artifactId>
-                <version>2.2</version>
+                <version>1.0.0</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>org.apache.felix.webconsole</artifactId>
-                <version>4.2.0</version>
+                <version>4.3.8</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
@@ -88,13 +82,13 @@
             <dependency>
                 <groupId>org.apache.httpcomponents</groupId>
                 <artifactId>httpclient</artifactId>
-                <version>4.5.5</version>
+                <version>4.5.6</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.jackrabbit</groupId>
                 <artifactId>jackrabbit-api</artifactId>
-                <version>2.14.4</version>
+                <version>2.18.2</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
@@ -106,7 +100,13 @@
             <dependency>
                 <groupId>org.apache.jackrabbit</groupId>
                 <artifactId>oak-core</artifactId>
-                <version>1.6.8</version>
+                <version>1.16.0</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.jackrabbit</groupId>
+                <artifactId>oak-jcr</artifactId>
+                <version>1.16.0</version>
                 <scope>provided</scope>
             </dependency>
 
@@ -114,13 +114,13 @@
             <dependency>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.api</artifactId>
-                <version>2.18.0</version>
+                <version>2.20.0</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.caconfig.api</artifactId>
-                <version>1.0.0</version>
+                <version>1.1.2</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
@@ -132,13 +132,13 @@
             <dependency>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.commons.johnzon</artifactId>
-                <version>1.0.0</version>
+                <version>1.1.2</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
-                <artifactId>org.apache.sling.engine</artifactId>
-                <version>2.6.12</version>
                 <groupId>org.apache.sling</groupId>
+                <artifactId>org.apache.sling.engine</artifactId>
+                <version>2.6.18</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
@@ -161,26 +161,20 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.sling</groupId>
-                <artifactId>org.apache.sling.jcr.base</artifactId>
-                <version>2.0.6</version>
-                <scope>provided</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.jcr.resource</artifactId>
-                <version>2.3.8</version>
+                <version>3.0.18</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.models.api</artifactId>
-                <version>1.3.6</version>
+                <version>1.3.8</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.rewriter</artifactId>
-                <version>1.0.4</version>
+                <version>1.2.2</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
@@ -192,27 +186,33 @@
             <dependency>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.servlets.post</artifactId>
-                <version>2.3.22</version>
+                <version>2.3.30</version>
                 <scope>provided</scope>
             </dependency>
 
             <!-- Utilities / Misc -->
             <dependency>
+                <groupId>org.apache.commons</groupId>
                 <artifactId>commons-email</artifactId>
                 <version>1.5</version>
-                <groupId>org.apache.commons</groupId>
                 <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.commons</groupId>
                 <artifactId>commons-lang3</artifactId>
-                <version>3.4</version>
+                <version>3.8.1</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-math</artifactId>
+                <version>2.2</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>commons-io</groupId>
                 <artifactId>commons-io</artifactId>
-                <version>1.4</version>
+                <version>2.6</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
@@ -256,7 +256,7 @@
             <dependency>
                 <groupId>org.apache.pdfbox</groupId>
                 <artifactId>pdfbox</artifactId>
-                <version>2.0.12</version>
+                <version>2.0.16</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
@@ -274,7 +274,7 @@
             <dependency>
                 <groupId>org.apache.tika</groupId>
                 <artifactId>tika-core</artifactId>
-                <version>1.19.1</version>
+                <version>1.21</version>
                 <scope>provided</scope>
             </dependency>
 
@@ -282,7 +282,7 @@
             <dependency>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.testing.sling-mock.junit4</artifactId>
-                <version>2.3.0</version>
+                <version>2.3.16</version>
                 <scope>test</scope>
             </dependency>
             <dependency>