Hi @All,
I'm tring to add my custom "Public-Offshore-Author" group to "DAM Users[OOTB]", but Im always getting build failure with following error:
Solved! Go to Solution.
Views
Replies
Total Likes
The error message indicates a parsing error due to an unexpected token in the JSON script. Specifically, the error points to the "add" command, which seems to have a typo at the end of the script. The typo is the unexpected "nend" at the end of the last command, which should likely be "end". However, "end" is not necessary unless it's part of a specific syntax required by the system processing these scripts, which doesn't seem to be the case here based on the provided context. The corrected JSON should remove the typo and ensure proper JSON formatting:
The error message indicates a parsing error due to an unexpected token in the JSON script. Specifically, the error points to the "add" command, which seems to have a typo at the end of the script. The typo is the unexpected "nend" at the end of the last command, which should likely be "end". However, "end" is not necessary unless it's part of a specific syntax required by the system processing these scripts, which doesn't seem to be the case here based on the provided context. The corrected JSON should remove the typo and ensure proper JSON formatting:
end would still be required for the set ACL block I believe. Without it the syntax would still be probably broken. So, it should be something like
{
"scripts": [
"create group \"Public-Offshore-Author\"",
"set ACL for \"Public-Offshore-Author\"\n allow jcr:read on /content/mysite/en/Products-and-Services/offshore-energy\n allow jcr:modifyProperties on /content/mysite/en/Products-and-Services/offshore-energy\n allow jcr:addChildNodes on /content/mysite/en/Products-and-Services/offshore-energy\n allow jcr:removeNode on /content/mysite/en/Products-and-Services/offshore-energy\nend",
"add \"Public-Offshore-Author\" to group \"DAM Users\""
]
}
https://sling.apache.org/documentation/bundles/repository-initialization.html
{
"scripts": [
"create group \"Public-Offshore-Author\"",
"set ACL for \"Public-Offshore-Author\"\n allow jcr:read on /content/mysite/en/Products-and-Services/offshore-energy\n allow jcr:modifyProperties on /content/mysite/en/Products-and-Services/offshore-energy\n allow jcr:addChildNodes on /content/mysite/en/Products-and-Services/offshore-energy\n allow jcr:removeNode on /content/mysite/en/Products-and-Services/offshore-energy\nend",
"add \"Public-Offshore-Author\" to group \"DAM Users\""
]
}
You can try XML way as well:
https://www.nextrow.com/blog/adobe-experience-manager/getting-started-with-apache-sling-repo-init
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies