-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: Add optional restriction of script execution to certain object fields and values #2488
Conversation
I will reformat the title to use the proper commit message syntax. |
Thanks for opening this pull request!
|
Uffizzi Ephemeral Environment
|
Wow, impressive PR! The two referenced issues are not necessarily related. One could enable a script only on |
Updated the syntax so the full Parse Object is passed through: "validator": (row, field) => row.get(field) > new Date("2025") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you resolve the conflicts? I've merged the lint and prettier PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a short example for this new feature to the README?
Signed-off-by: Daniel <[email protected]>
Btw could you see whether the prettier hook works for you? I've added husky to the repo, but not sure whether the git hook is actually working for existing clones of the repo. |
Didn't seem to run for me, perhaps my branch is outdated |
Maybe hooks don't get committed? If I add a hook at least I don't see anything to commit. Anyway, was just a side node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please ament the README to document this feature?
@dblythy Could your take a look at the open questions? This seems almost ready to get merged. |
Uffizzi Ephemeral Environment
|
# [6.0.0-alpha.8](6.0.0-alpha.7...6.0.0-alpha.8) (2024-06-27) ### Features * Add optional restriction of script execution to certain object fields and values ([#2488](#2488)) ([8feac9b](8feac9b))
🎉 This change has been released in version 6.0.0-alpha.8 |
New Pull Request Checklist
Issue Description
Currently,
scripts
show on all fields, and every single value.Closes: #2487
Closes: #2485
Approach
Adds the following script syntax:
If using this syntax, the
script
will only show on a field defined infields
, and it will bedisabled
if thevalidator
returnsfalse
.TODOs before merging