mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 02:14:23 +00:00
Document who can edit a wiki from the API, widget and public links
This commit is contained in:
1 parent
5a78fd1fa7
commit
d4b30f4838
3 files changed
+20
-1
No files matched your search
@@ -143,12 +143,13 @@ Sharing rules:
|
||||
- Each share carries an access level: **`viewer`** (read-only) or **`editor`** (read and modify).
|
||||
- `editor` is not the same as owner — an editor can change a resource but cannot delete it or re-share it.
|
||||
- Shared tools run server-side with the **owner's** credentials; a grantee never sees the owner's secrets.
|
||||
- A wiki's editors can edit its pages, but only its owner decides whether API, widget and public-link users can edit it through an agent (see [Wiki sources](/Sources/Wiki-sources#edits-from-the-api-widget-and-public-links)).
|
||||
|
||||
## Audit log
|
||||
|
||||
Access-control actions are appended to the `auth_events` table alongside the [authentication events](/Deploying/OIDC-SSO#login-auditing). This includes admin actions — `admin_user_activated` / `admin_user_deactivated`, `admin_sessions_revoked`, `role_granted` / `role_revoked` (with `metadata.source` = `manual` or `oidc_group`), `quota_policy_set` / `quota_policy_deleted` — and team events (`team.create`, `team.member_add`, `team.member_role`, `team.member_remove`, `team.share`, `team.unshare`, `team.transfer_owner`, `team.delete`).
|
||||
|
||||
Data-plane actions are recorded too: `source.created` / `source.deleted` / `source.reingested`, `agent.created` / `agent.updated` / `agent.deleted` / `agent.key_regenerated`, and `conversation.deleted` / `conversation.deleted_all`.
|
||||
Data-plane actions are recorded too: `source.created` / `source.deleted` / `source.reingested` / `source.wiki_settings_updated`, `agent.created` / `agent.updated` / `agent.deleted` / `agent.key_regenerated`, and `conversation.deleted` / `conversation.deleted_all`.
|
||||
|
||||
Every row carries `actor_id` (who did it) and `target_id` (the user it was done to, or `NULL` when the event is not about a user), so "everything this admin did" is a single query:
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ The same list covers people who open the agent from its public link without bein
|
||||
|
||||
Schedules that an API or widget chat set up before this version still run as the owner's own, without this list, until they fire or expire. Schedules set from a public link follow the list from their next run.
|
||||
|
||||
Wikis have their own switch rather than an entry in this list: API, widget and public-link users can read a wiki the agent uses but edit it only when the wiki's owner turns on **Let API, widget and public-link users edit this wiki** in its **Wiki settings** (see [Wiki sources](/Sources/Wiki-sources#edits-from-the-api-widget-and-public-links)).
|
||||
|
||||
A webhook is the owner's own automation (its URL is a secret), so its runs are not limited by this list. Nobody can approve during a webhook run, so it still skips every action that needs approval.
|
||||
|
||||
### What answers show
|
||||
|
||||
@@ -90,7 +90,23 @@ PUT /api/sources/<source_id>/wiki/page # create or overwrite a page (
|
||||
|
||||
Human edits are stamped with `human` provenance and trigger the same re-embed as agent edits. Read access follows source sharing (owner or anyone the source is shared with); writing requires owner or team `editor` access.
|
||||
|
||||
## Edits from the API, widget and public links
|
||||
|
||||
An agent called with its API key (the website widget, the API) runs as its owner, and people who open an agent from its public link are strangers to the owner. By default, neither can change a wiki: they can still read it through the agent, but the agent isn't offered the create, edit, delete or rename actions in those chats, and the Wiki tool refuses them if it's asked anyway.
|
||||
|
||||
The wiki's owner can allow such edits. On the **Sources** page, open the wiki's menu, choose **Wiki settings**, and turn on **Let API, widget and public-link users edit this wiki**. The change applies from the next message, including in chats that are already open. Only the owner sees it; team editors can't change it. You and the wiki's editors can always edit it in DocsGPT, and so can agents you or they use there.
|
||||
|
||||
Scheduled and webhook runs don't get the Wiki tool, so they read a wiki through search but never edit it.
|
||||
|
||||
From the API, only a signed-in session can change the setting; a personal access token can read it but not change it:
|
||||
|
||||
```text
|
||||
GET /api/sources/<source_id>/wiki/settings # {"allow_outside_edits": false, ...}
|
||||
PUT /api/sources/<source_id>/wiki/settings # owner only; body {"allow_outside_edits": true}
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [Per-Source Configuration](/Sources/Per-source-configuration) — exposure and retrieval settings a wiki uses.
|
||||
- [Access Control & Teams](/Deploying/Access-Control) — sharing a wiki with a team.
|
||||
- [Connectors](/Guides/Connectors#agents-used-through-an-api-key) — what else an agent can and can't do for API, widget and public-link users.
|
||||
Reference in new issue
Block a user