You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/12/22 13:23:55 UTC
[sling-org-apache-sling-repoinit-parser] branch master updated:
SLING-7226 - accept relative or absolute paths in 'with path' clause
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz 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 f176cdf SLING-7226 - accept relative or absolute paths in 'with path' clause
f176cdf is described below
commit f176cdfebde779525fc3b2e71da2a9b9422b840c
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Dec 22 14:23:45 2017 +0100
SLING-7226 - accept relative or absolute paths in 'with path' clause
---
src/main/javacc/RepoInitGrammar.jjt | 3 ++-
src/test/resources/testcases/test-1-output.txt | 3 ++-
src/test/resources/testcases/test-1.txt | 3 ++-
src/test/resources/testcases/test-60-output.txt | 4 +++-
src/test/resources/testcases/test-60.txt | 4 +++-
src/test/resources/testcases/test-99-output.txt | 5 ++++-
src/test/resources/testcases/test-99.txt | 5 ++++-
7 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/main/javacc/RepoInitGrammar.jjt b/src/main/javacc/RepoInitGrammar.jjt
index 9c606c2..7c2215f 100644
--- a/src/main/javacc/RepoInitGrammar.jjt
+++ b/src/main/javacc/RepoInitGrammar.jjt
@@ -164,7 +164,8 @@ String withPathStatement() :
Token t = null;
}
{
- <WITH> <PATH> t=<PATH_STRING>
+ /* accept relative (string) or absolute path */
+ <WITH> <PATH> ( t=<STRING> | t=<PATH_STRING> )
{ return t.image; }
}
diff --git a/src/test/resources/testcases/test-1-output.txt b/src/test/resources/testcases/test-1-output.txt
index 2b66939..1152cc9 100644
--- a/src/test/resources/testcases/test-1-output.txt
+++ b/src/test/resources/testcases/test-1-output.txt
@@ -2,4 +2,5 @@ CreateServiceUser bob
CreateServiceUser alice
CreateServiceUser tom21
CreateServiceUser lonesome
-CreateServiceUser pathA with path /some/test/path
+CreateServiceUser pathA with path some/relative/path
+CreateServiceUser pathA with path /some/absolute/path
diff --git a/src/test/resources/testcases/test-1.txt b/src/test/resources/testcases/test-1.txt
index 89684f3..01abd85 100644
--- a/src/test/resources/testcases/test-1.txt
+++ b/src/test/resources/testcases/test-1.txt
@@ -1,3 +1,4 @@
create service user bob,alice, tom21
create service user lonesome
-create service user pathA with path /some/test/path
\ No newline at end of file
+create service user pathA with path some/relative/path
+create service user pathA with path /some/absolute/path
\ No newline at end of file
diff --git a/src/test/resources/testcases/test-60-output.txt b/src/test/resources/testcases/test-60-output.txt
index 428cd59..25c848d 100644
--- a/src/test/resources/testcases/test-60-output.txt
+++ b/src/test/resources/testcases/test-60-output.txt
@@ -5,4 +5,6 @@ CreateUser userD (with encoded password), password=dc460da4ad72c, passwordEncodi
CreateUser userE (with encoded password), password=afdgwdsdf, passwordEncoding=someEncoding
CreateUser one_with-more-chars.ok:/123456 (with encoded password), password=pw-with.ok-:/13456, passwordEncoding=encoding_with.ok-:/12345
CreateUser userF with path /thePathF
-CreateUser userG with path /thePathG (with encoded password), password=userGpwd, passwordEncoding=theEncoding
\ No newline at end of file
+CreateUser userG with path /thePathG (with encoded password), password=userGpwd, passwordEncoding=theEncoding
+CreateUser userH with path thePathH
+CreateUser userJ with path thePathJ (with encoded password), password=userJpwd, passwordEncoding=theEncoding
\ No newline at end of file
diff --git a/src/test/resources/testcases/test-60.txt b/src/test/resources/testcases/test-60.txt
index 5ac827b..7b8fe14 100644
--- a/src/test/resources/testcases/test-60.txt
+++ b/src/test/resources/testcases/test-60.txt
@@ -11,4 +11,6 @@ create user userE with password {someEncoding} afdgwdsdf
create user one_with-more-chars.ok:/123456 with password {encoding_with.ok-:/12345} pw-with.ok-:/13456
create user userF with path /thePathF
-create user userG with path /thePathG with password {theEncoding} userGpwd
\ No newline at end of file
+create user userG with path /thePathG with password {theEncoding} userGpwd
+create user userH with path thePathH
+create user userJ with path thePathJ with password {theEncoding} userJpwd
\ No newline at end of file
diff --git a/src/test/resources/testcases/test-99-output.txt b/src/test/resources/testcases/test-99-output.txt
index ee17510..9cbe34e 100644
--- a/src/test/resources/testcases/test-99-output.txt
+++ b/src/test/resources/testcases/test-99-output.txt
@@ -7,7 +7,8 @@ SetAclPaths on /libs /apps
AclLine DENY {principals=[user1], privileges=[jcr:lockManagement]}
AclLine REMOVE {principals=[u3], privileges=[jcr:understand, some:other]}
CreateServiceUser bob_the_service
-CreateServiceUser zoo_the_keeper with path /keeper/zoo
+CreateServiceUser zoo_the_keeper with path relative/zoo
+CreateServiceUser zoo_the_keeper with path /absolute/zoo
SetAclPaths on /tmp
AclLine ALLOW {principals=[bob_the_service], privileges=[some:otherPrivilege]}
CreatePath [content, example.com(sling:Folder)]
@@ -34,5 +35,7 @@ CreateUser userE (with encoded password), password=afdgwdsdf, passwordEncoding=s
CreateUser one_with-more-chars.ok:/123456 (with encoded password), password=pw-with.ok-:/13456, passwordEncoding=encoding_with.ok-:/12345
CreateUser userF with path /for/userF
CreateUser userG with path /for/userG (with password), password=ggg
+CreateUser userH with path for/userH
+CreateUser userJ with path for/userJ (with password), password=jjj
CreateServiceUser the-last-one
DisableServiceUser svc1 : This is the message
diff --git a/src/test/resources/testcases/test-99.txt b/src/test/resources/testcases/test-99.txt
index cd288c4..4529364 100644
--- a/src/test/resources/testcases/test-99.txt
+++ b/src/test/resources/testcases/test-99.txt
@@ -11,7 +11,8 @@ set ACL on /libs,/apps
end
create service user bob_the_service
-create service user zoo_the_keeper with path /keeper/zoo
+create service user zoo_the_keeper with path relative/zoo
+create service user zoo_the_keeper with path /absolute/zoo
# Verify that indent is not required
set ACL on /tmp
@@ -57,6 +58,8 @@ create user userE with password {someEncoding} afdgwdsdf
create user one_with-more-chars.ok:/123456 with password {encoding_with.ok-:/12345} pw-with.ok-:/13456
create user userF with path /for/userF
create user userG with path /for/userG with password ggg
+create user userH with path for/userH
+create user userJ with path for/userJ with password jjj
create service user the-last-one
disable service user svc1 : "This is the message"
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].