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

feat: Add optional restriction of script execution to certain object fields and values #2488

Merged
merged 12 commits into from
Jun 27, 2024
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,31 @@ You can specify scripts to execute Cloud Functions with the `scripts` option:
]
```

You can also specify custom fields with the `scrips` option:

```json
"apps": [
{
"scripts": [
{
"title": "Delete account",
"classes": [
{
"name": "_User",
"fields": [
{ "name": "createdAt", "validator": "value => value > new Date(\"2025\")" }
]
}
],
mtrezza marked this conversation as resolved.
Show resolved Hide resolved
"cloudCodeFunction": "deleteAccount"
}
]
}
]

```


Next, define the Cloud Function in Parse Server that will be called. The object that has been selected in the data browser will be made available as a request parameter:

```js
Expand Down