You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2019/06/25 10:46:59 UTC
[sling-org-apache-sling-repoinit-parser] branch master updated:
SLING-8532: allow priviledges with double point inside of them.
This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git
The following commit(s) were added to refs/heads/master by this push:
new eedffe5 SLING-8532: allow priviledges with double point inside of them.
eedffe5 is described below
commit eedffe5b1dfbcd6b531749c0464b451caf572ef0
Author: Karl Pauls <ka...@gmail.com>
AuthorDate: Tue Jun 25 12:46:32 2019 +0200
SLING-8532: allow priviledges with double point inside of them.
Co-authored-by: Christophe Jelger <je...@adobe.com>
---
src/main/javacc/RepoInitGrammar.jjt | 2 +-
src/test/resources/testcases/test-99-output.txt | 3 ++-
src/test/resources/testcases/test-99.txt | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/javacc/RepoInitGrammar.jjt b/src/main/javacc/RepoInitGrammar.jjt
index 43a9a6b..bc00916 100644
--- a/src/main/javacc/RepoInitGrammar.jjt
+++ b/src/main/javacc/RepoInitGrammar.jjt
@@ -493,7 +493,7 @@ void registerPrivilegeStatement(List<Operation> result) :
List<String> aggregates = new ArrayList<String>();
}
{
- <REGISTER> ((<ABSTRACT>) {isAbstract = true;})? <PRIVILEGE> privilege = <STRING> (<WITH> aggregates = principalsList())?
+ <REGISTER> ((<ABSTRACT>) {isAbstract = true;})? <PRIVILEGE> (privilege = <STRING> | privilege = <NAMESPACED_ITEM>) (<WITH> aggregates = principalsList())?
{
result.add(new RegisterPrivilege(privilege.image, isAbstract, aggregates));
}
diff --git a/src/test/resources/testcases/test-99-output.txt b/src/test/resources/testcases/test-99-output.txt
index b5805ec..f5136a9 100644
--- a/src/test/resources/testcases/test-99-output.txt
+++ b/src/test/resources/testcases/test-99-output.txt
@@ -31,6 +31,7 @@ RegisterNodetypes:
[slingevent:Event] > nt:unstructured, nt:hierarchyNode
- slingevent:topic (string)
- slingevent:properties (binary)
+register privilege crx:replicate
register privilege priv
register abstract privilege abstract_priv
register privilege priv with declared_aggregate_priv
@@ -45,4 +46,4 @@ CreateServiceUser the-last-one
DisableServiceUser svc1 : This is the message
CreateGroup since124_A
CreateGroup since124_B with path /path_B
-DeleteGroup since124_C
\ No newline at end of file
+DeleteGroup since124_C
diff --git a/src/test/resources/testcases/test-99.txt b/src/test/resources/testcases/test-99.txt
index 1e3511f..7aa0d8b 100644
--- a/src/test/resources/testcases/test-99.txt
+++ b/src/test/resources/testcases/test-99.txt
@@ -63,6 +63,7 @@ register nodetypes
- slingevent:properties (binary)
===>>
+register privilege crx:replicate
register privilege priv
register abstract privilege abstract_priv
register privilege priv with declared_aggregate_priv