Просмотр исходного кода

docs: explain that triggered actions run as the system usergroup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesread 1 день назад
Родитель
Сommit
7e95781a1d

+ 19 - 0
docs/modules/ROOT/pages/security/acl.adoc

@@ -116,6 +116,25 @@ accessControlLists:
     addToEveryAction: true
 ```
 
+[#acls-for-triggers]
+=== ACLs for triggers (startup, cron, webhooks)
+
+Actions started by a trigger, such as `execOnStartup`, `execOnCron`, `execOnCalendarFile`, `execOnFileCreatedInDir` or `execOnWebhook`, run as a user in the `system` usergroup, and the same ACL checks apply. If you set `defaultPermissions.exec` to `false`, give the `system` usergroup `exec`, or your triggered actions will be blocked:
+
+[source,yaml]
+.`config.yaml`
+```yaml
+accessControlLists:
+  - name: system_triggers
+    matchUsergroups:
+      - system
+    permissions:
+      exec: true
+    addToEveryAction: true
+```
+
+Triggers only start the actions that you configured them on, so adding this ACL to every action does not let anyone else run those actions.
+
 == ACLs and Dashboards
 
 Root dashboards can also list `acls`. This controls whether the **whole dashboard page** is visible (including `display` widgets and entity fieldsets), not just action buttons.

+ 2 - 0
docs/modules/ROOT/pages/security/example_some_admin_actions.adoc

@@ -8,6 +8,8 @@ OliveTin ACLs are *allow lists*, not deny lists. Each action starts with `defaul
 
 The default `defaultPermissions` allow guests to view and execute every action. To restrict some actions to logged-in admins while leaving others open to guests, set `defaultPermissions` to deny access by default, then use ACLs to explicitly grant access on each action.
 
+If any actions use triggers such as `execOnStartup`, `execOnCron` or `execOnWebhook`, also grant `exec` to the `system` usergroup. See xref:security/acl.adoc#acls-for-triggers[ACLs for triggers].
+
 See xref:security/acl.adoc[Access Control Lists] for the full ACL reference.
 
 == Full example configuration