Update ACL
update_aclModify an ACL’s fields such as roles, condition, script, and active state, capturing each verified change in a specified update set. Confirm who gains or loses access before applying.
Instructions
Change an access control's fields (roles: add_acl_role / remove_acl_role). This is a security change: before calling it, tell the user who gains or loses access and get their go-ahead. It elevates its own session to security_admin (only for ACL tools; other tools stay unelevated) and writes into the named update set, verifying each write by reading it back. On an ACL that already has code (a script or javascript: condition), switching it on, changing its operation or turning admin overrides off also needs permission to run code. Deactivating (active=false) is a security change too: other ACLs, the parent table's, or the default then decide, and switching off a Deny-Unless ACL can only widen access.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | The ACL's application: its scope name (e.g. "x_acme_app"), or "global". Give this or scope_id. | |
| active | No | Activate (true) or deactivate (false). | |
| script | No | Script that sets `answer`. Also turns on advanced, so the form shows it (the platform runs it either way). Code on an ACL runs on the instance at every check, so setting it needs permission to run code as well as to write. | |
| sys_id | Yes | The ACL's sys_id. | |
| instance | No | The ServiceNow instance auth alias to connect to. This is the alias configured via `snc configure` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| scope_id | No | The ACL's application by sys_scope sys_id, instead of scope. | |
| condition | No | Encoded query condition the record must meet. A javascript: value in it is code: it needs permission to run code as well as to write. | |
| operation | No | Operation name. | |
| update_set | Yes | sys_id of an In progress update set of that application (create one with create_update_set). Every write is captured there and verified; the user's own current update set is left as it is. | |
| description | No | Description. The platform may write its own on first save. | |
| decision_type | No | allow (Allow-If; create_acl default) or deny (Deny-Unless: checked first, grants nothing on its own). update_acl: omit to leave it. | |
| admin_overrides | No | Whether admin passes regardless (the form's Admin overrides). create_acl default: true; update_acl: omit to leave it. | |
| acknowledge_upgrade_skip | No | Only for an installed Store application, and only after the user has reviewed it: upgrades of that application then skip this ACL until the customization is reviewed. |