You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2020/09/25 17:21:55 UTC

[sling-org-apache-sling-scripting-sightly-testing-content] branch master updated: SLING-9768 - The org.apache.sling.api.scripting.SlingScript#getScriptResource implementations should not leak the scripting resolver

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

radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing-content.git


The following commit(s) were added to refs/heads/master by this push:
     new 33c3f8f  SLING-9768 - The org.apache.sling.api.scripting.SlingScript#getScriptResource implementations should not leak the scripting resolver
33c3f8f is described below

commit 33c3f8fcc1d70c5c9c9627d514a8a3815e8dd207
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Fri Sep 25 19:20:35 2020 +0200

    SLING-9768 - The org.apache.sling.api.scripting.SlingScript#getScriptResource implementations should not leak the scripting resolver
    
    * added test setup
---
 .../templates-access-control/partials/include.html  | 19 +++++++++++++++++++
 .../partials/templates.html                         | 21 +++++++++++++++++++++
 .../templates-access-control.html                   | 19 +++++++++++++++++++
 .../content/sightly-testing/precompiled.json        |  5 +++++
 .../templates-access-control/classic.json           |  4 ++++
 .../templates-access-control/precompiled.json       |  4 ++++
 6 files changed, 72 insertions(+)

diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/partials/include.html b/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/partials/include.html
new file mode 100644
index 0000000..1762254
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/partials/include.html
@@ -0,0 +1,19 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<div class="include-wrapper" data-sly-use.templates="templates.html" data-sly-call="${templates.template}"></div>
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/partials/templates.html b/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/partials/templates.html
new file mode 100644
index 0000000..bfca950
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/partials/templates.html
@@ -0,0 +1,21 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<template data-sly-template.template>
+    <div class="template">template loaded</div>
+</template>
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/templates-access-control.html b/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/templates-access-control.html
new file mode 100644
index 0000000..d7d9f65
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/templates-access-control/templates-access-control.html
@@ -0,0 +1,19 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<div class="wrapper" data-sly-include="partials/include.html"></div>
diff --git a/src/main/resources/SLING-INF/content/sightly-testing/precompiled.json b/src/main/resources/SLING-INF/content/sightly-testing/precompiled.json
new file mode 100644
index 0000000..db50ba9
--- /dev/null
+++ b/src/main/resources/SLING-INF/content/sightly-testing/precompiled.json
@@ -0,0 +1,5 @@
+{
+    "jcr:primaryType": "nt:unstructured",
+    "sling:resourceType": "org/apache/sling/scripting/sightly/testing/precompiled",
+    "jcr:title": "HTL Precompiled Scripts Test"
+}
diff --git a/src/main/resources/SLING-INF/content/sightly-testing/templates-access-control/classic.json b/src/main/resources/SLING-INF/content/sightly-testing/templates-access-control/classic.json
new file mode 100644
index 0000000..967b7ef
--- /dev/null
+++ b/src/main/resources/SLING-INF/content/sightly-testing/templates-access-control/classic.json
@@ -0,0 +1,4 @@
+{
+    "jcr:primaryType": "nt:unstructured",
+    "sling:resourceType": "sightly/scripts/templates-access-control"
+}
diff --git a/src/main/resources/SLING-INF/content/sightly-testing/templates-access-control/precompiled.json b/src/main/resources/SLING-INF/content/sightly-testing/templates-access-control/precompiled.json
new file mode 100644
index 0000000..6ff0e7f
--- /dev/null
+++ b/src/main/resources/SLING-INF/content/sightly-testing/templates-access-control/precompiled.json
@@ -0,0 +1,4 @@
+{
+    "jcr:primaryType": "nt:unstructured",
+    "sling:resourceType": "org/apache/sling/scripting/sightly/testing/precompiled/templates-access-control"
+}