Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation fails when script has no directives #447

Closed
krystian-panek-vmltech opened this issue Oct 17, 2024 · 0 comments · Fixed by #448
Closed

Validation fails when script has no directives #447

krystian-panek-vmltech opened this issue Oct 17, 2024 · 0 comments · Fixed by #448
Labels

Comments

@krystian-panek-vmltech
Copy link

Temporarily I decided to comment out all script contents, then APM reports error

image

for script:

# ==========================================
# Creates system users / application related
# ==========================================

# CREATE-SYSTEM-USER "service-foundation-reader" path= "/home/users/system/foundation-service"
# FOR-USER "service-foundation-reader" BEGIN
#     SET-PROPERTY "profile/givenName" "Foundation Service"
#     SET-PROPERTY "profile/familyName" "Reader"
#     SET-PROPERTY "profile/aboutMe" "Foundation service user with read access to /content"
#     ALLOW "/content" ["READ"]
#     ALLOW "/tmp" ["READ"]
#     ALLOW "/content/cq:tags" ["READ"]
#     ALLOW "/apps" ["READ"]
# END

# CREATE-SYSTEM-USER "service-foundation-writer" path= "/home/users/system/foundation-service"
# FOR-USER "service-foundation-writer" BEGIN
#     SET-PROPERTY "profile/givenName" "Foundation Service"
#     SET-PROPERTY "profile/familyName" "Writer"
#     SET-PROPERTY "profile/aboutMe" "Foundation service user with write access to /content"
#     ALLOW "/content" ["READ", "MODIFY", "CREATE", "DELETE", "REPLICATE", "READ_ACL", "MODIFY_ACL"]
#     ALLOW "/conf/straumann" ["READ", "MODIFY", "CREATE", "DELETE", "REPLICATE", "READ_ACL", "MODIFY_ACL"] --IF-EXISTS
#     ALLOW "/tmp" ["READ", "MODIFY", "CREATE", "DELETE"]
#     ALLOW "/apps" ["READ"]
#     ADD-PARENTS ["workflow-administrators"]
# END

I need to have at least

DEFINE foo "bar"

uncommented to have validation passing.
what is more APM should tell more user-friendly error when AntlR parsing error occurs like "Script has syntax error(s)." and eventually then more error details

@dprzybyl dprzybyl linked a pull request Oct 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant