@superglue/cli 1.1.27 → 1.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/cli.js +181 -605
- package/dist/skills/superglue/SKILL.md +16 -1
- package/dist/skills/superglue/references/access-rules.md +65 -31
- package/package.json +1 -1
- package/skills/superglue/SKILL.md +16 -1
- package/skills/superglue/references/access-rules.md +65 -31
|
@@ -25,7 +25,7 @@ Read these on demand — they are authoritative for their topic and kept in sync
|
|
|
25
25
|
| `sg skill redis` | Redis command syntax, connection URLs, key type handling |
|
|
26
26
|
| `sg skill sftp-smb` | SFTP, FTP, and SMB operations, file upload/download semantics, path handling |
|
|
27
27
|
| `sg skill file-handling` | File detection, parsing, `file::` reference syntax, lazy base64 access, transform-produced files |
|
|
28
|
-
| `sg skill access-rules` | RBAC roles and
|
|
28
|
+
| `sg skill access-rules` | RBAC roles, resource grants, and tool/system permissions (enterprise only) |
|
|
29
29
|
|
|
30
30
|
## CRITICAL RULES — READ FIRST
|
|
31
31
|
|
|
@@ -394,6 +394,19 @@ sourceData = {
|
|
|
394
394
|
}
|
|
395
395
|
```
|
|
396
396
|
|
|
397
|
+
### Naming Rules — Avoiding Key Collisions
|
|
398
|
+
|
|
399
|
+
Everything in `sourceData` shares ONE flat namespace, and the runtime does not detect collisions — when two sources use the same key, one silently wins and the tool misbehaves with no error. Prevent collisions at design time:
|
|
400
|
+
|
|
401
|
+
Never use these as payload input keys or step ids:
|
|
402
|
+
|
|
403
|
+
- `__files__`, `currentItem`, `sg_auth_email` — overwritten by the runtime
|
|
404
|
+
- `page`, `offset`, `cursor`, `limit`, `pageSize` — a payload key with one of these names shadows the live pagination counters; paginated steps silently stop advancing past the first page
|
|
405
|
+
- the tool's own step ids — the step result overwrites a same-named payload key for all subsequent steps
|
|
406
|
+
- credential keys available to a step (`<systemId>_<credKey>`, `<systemId>_url`, and any runtime-supplied credential names) — the credential value silently replaces the payload value
|
|
407
|
+
|
|
408
|
+
Safe naming: payload inputs get specific, domain-flavored names (`customerId`, `reportMonth`, `maxResults` — never `page`, `limit`, `cursor`, `data`); step ids are verb-prefixed camelCase (`fetchUsers`) and distinct from every payload key. If the user asks for an input named like a reserved key, use a safe alternative and explain why.
|
|
409
|
+
|
|
397
410
|
### Step Result Envelopes
|
|
398
411
|
|
|
399
412
|
**Every** step result is wrapped in `{ currentItem, data, success }`. You MUST account for this when writing data selectors or transforms.
|
|
@@ -588,6 +601,7 @@ curl -X POST "https://api.superglue.cloud/v1/hooks/{toolId}?token=$SUPERGLUE_API
|
|
|
588
601
|
- **POST for read-only ops** — GraphQL queries via POST should have `modify: false`. Don't rely on HTTP method alone
|
|
589
602
|
- **Saving without approval** — always present `sg tool run` results and ask before `sg tool save`
|
|
590
603
|
- **`sg_auth_email` in scheduled runs** — not available in scheduler-triggered executions. Tools using `<<sg_auth_email>>` will fail
|
|
604
|
+
- **Reserved key collisions** — payload inputs or step ids named after reserved/injected keys (see Naming Rules) fail silently with wrong values, never with an error
|
|
591
605
|
|
|
592
606
|
---
|
|
593
607
|
|
|
@@ -627,6 +641,7 @@ For protocol-specific error recovery (HTTP, Postgres, MSSQL, Redis, GraphQL, SFT
|
|
|
627
641
|
2. Re-run with `--include-step-results` to see the exact envelope shape
|
|
628
642
|
3. Paginated steps merge into a single `.data` field — do not `.map()` over them
|
|
629
643
|
4. Verify `sourceData.currentItem` is only referenced inside looping steps (set by the step's own `dataSelector`, not upstream)
|
|
644
|
+
5. If a step silently received the wrong value (no error thrown) or pagination stopped after one page, check for a key collision between payload inputs, step ids, credential keys, and reserved runtime keys — see Naming Rules. Fix by renaming the input, not by working around it
|
|
630
645
|
|
|
631
646
|
### Persistent failures
|
|
632
647
|
|
|
@@ -1,51 +1,73 @@
|
|
|
1
1
|
# Access Rules (RBAC)
|
|
2
2
|
|
|
3
|
-
On superglue, roles define
|
|
3
|
+
On superglue, roles define active resource grants for tools and systems. Users can have multiple roles. Roles and access rules are only available on enterprise organizations.
|
|
4
4
|
|
|
5
5
|
## Data Model
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
|
+
interface ResourceGrant {
|
|
9
|
+
roleId: string;
|
|
10
|
+
resourceRef: "tool:<encodedId>" | "system:<encodedId>" | "tool:*" | "system:*";
|
|
11
|
+
permissions: Array<"viewer" | "editor">;
|
|
12
|
+
source: "access_rule" | "ownership" | "share";
|
|
13
|
+
grantedByUserId?: string;
|
|
14
|
+
revokedAt?: Date;
|
|
15
|
+
revokedByUserId?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
8
18
|
interface Role {
|
|
9
19
|
id: string;
|
|
10
20
|
name: string;
|
|
11
21
|
description?: string;
|
|
12
|
-
|
|
13
|
-
systems: "ALL" | string[];
|
|
22
|
+
resourceGrants: ResourceGrant[];
|
|
14
23
|
isBaseRole?: boolean;
|
|
15
24
|
}
|
|
16
25
|
```
|
|
17
26
|
|
|
18
|
-
Only
|
|
27
|
+
Only active grants where `revokedAt` is empty contribute to access. `editor` implies `viewer`.
|
|
28
|
+
|
|
29
|
+
## Resource Refs
|
|
30
|
+
|
|
31
|
+
- `tool:<encodedToolId>` — one specific tool.
|
|
32
|
+
- `system:<encodedSystemId>` — one specific system.
|
|
33
|
+
- `tool:*` — every current and future tool.
|
|
34
|
+
- `system:*` — every current and future system.
|
|
19
35
|
|
|
20
|
-
|
|
36
|
+
Resource ids are URL-encoded inside `resourceRef`; use shared helpers rather than hand-building refs.
|
|
21
37
|
|
|
22
|
-
|
|
23
|
-
- `tools: ["tool-id-1", "tool-id-2"]` — only these specific tools are allowed
|
|
24
|
-
- Effective tool visibility also requires access to every system referenced by that tool's request steps
|
|
38
|
+
## Permissions
|
|
25
39
|
|
|
26
|
-
|
|
40
|
+
- `viewer` — can see and execute/use the resource.
|
|
41
|
+
- `editor` — can mutate/delete/share the resource and includes `viewer`.
|
|
27
42
|
|
|
28
|
-
|
|
29
|
-
- `systems: ["gmail", "stripe"]` — only these specific systems are allowed
|
|
30
|
-
- System access is binary by system ID: listed means allowed, omitted means denied.
|
|
43
|
+
Current configured role access and ownership grants are generally stored as `editor`.
|
|
31
44
|
|
|
32
|
-
##
|
|
45
|
+
## Grant Sources
|
|
33
46
|
|
|
34
|
-
|
|
47
|
+
- `access_rule` — explicit admin/Access Rules edit.
|
|
48
|
+
- `ownership` — authorization projection from the resource creator.
|
|
49
|
+
- `share` — explicit user-to-user sharing through the app/agent sharing flow.
|
|
35
50
|
|
|
36
|
-
|
|
37
|
-
2. The user has access to every `systemId` referenced by the tool's request steps.
|
|
51
|
+
Ownership source of truth remains the tool/system row. Ownership grants are a permission projection and should be preserved by ordinary role edits.
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
## Visibility and Execution Surfaces
|
|
54
|
+
|
|
55
|
+
- **Tools** — list/detail, agent views, VFS, REST detail, and tool history use tool `viewer`.
|
|
56
|
+
- **Systems** — list/detail, agent views, VFS, docs, credentials, and `sg system call` use system `viewer`.
|
|
57
|
+
- **Execution** — running a tool requires tool `viewer` plus system `viewer` for every referenced system.
|
|
58
|
+
- **Editing** — updating tools/systems requires `editor`.
|
|
59
|
+
- **Runs** — visible only when the user has tool `viewer` and system `viewer` for every captured system.
|
|
60
|
+
- **Schedules** — visibility follows current tool behavior; editing requires tool `editor`.
|
|
61
|
+
- **MCP** — config shows configured tools; runtime registration uses tool `viewer`, and execution still checks referenced systems.
|
|
40
62
|
|
|
41
63
|
## Multi-Role Semantics
|
|
42
64
|
|
|
43
65
|
Users can have multiple roles. Resolution is union:
|
|
44
66
|
|
|
45
|
-
| Layer | Semantics
|
|
46
|
-
| ------- |
|
|
47
|
-
| Tools | If any
|
|
48
|
-
| Systems | If any
|
|
67
|
+
| Layer | Semantics |
|
|
68
|
+
| ------- | -------------------------------------------------------------------------- |
|
|
69
|
+
| Tools | If any active grant targets a tool, that grant's permission is effective |
|
|
70
|
+
| Systems | If any active grant targets a system, that grant's permission is effective |
|
|
49
71
|
|
|
50
72
|
Assigned roles can add access but cannot remove access granted by another role.
|
|
51
73
|
|
|
@@ -53,25 +75,37 @@ Assigned roles can add access but cannot remove access granted by another role.
|
|
|
53
75
|
|
|
54
76
|
Every user has exactly one base role:
|
|
55
77
|
|
|
56
|
-
- **`admin`** — full access to everything. The admin role is immutable.
|
|
57
|
-
- **`member`** — default for org team members.
|
|
78
|
+
- **`admin`** — full access to everything. The admin role is immutable and has wildcard `editor` grants.
|
|
79
|
+
- **`member`** — default for org team members. New organizations seed it with wildcard `editor` grants for tools and systems. Access-rule grants can be narrowed. Name and description cannot be changed. Cannot be deleted.
|
|
58
80
|
|
|
59
81
|
Users can also have additional custom roles on top of their base role. Custom roles are fully editable and can be created/deleted.
|
|
60
82
|
|
|
61
83
|
## Personal Roles
|
|
62
84
|
|
|
63
|
-
|
|
85
|
+
Personal roles are per-user containers for ownership, share, and explicit access-rule grants.
|
|
64
86
|
|
|
65
87
|
- Each user can have at most one personal role.
|
|
66
|
-
-
|
|
67
|
-
- Personal role
|
|
68
|
-
- Managed via the Personal Roles tab in Access Rules
|
|
88
|
+
- Ownership grants are added automatically when a user creates a tool or system.
|
|
89
|
+
- Personal role grants are unioned with the user's other roles.
|
|
90
|
+
- Managed via the Personal Roles tab in Access Rules and backend role APIs.
|
|
91
|
+
|
|
92
|
+
## Sharing Semantics
|
|
93
|
+
|
|
94
|
+
V1 sharing targets organization users only. It does not share directly to base roles or custom roles.
|
|
95
|
+
|
|
96
|
+
- Sharing writes `source: "share"` grants into the target user's personal role.
|
|
97
|
+
- A user can grant only permissions up to their own effective access: viewer can grant viewer, editor can grant viewer or editor.
|
|
98
|
+
- If the target already has the requested permission or stronger from any active grant, sharing is redundant and should be blocked.
|
|
99
|
+
- If the target has viewer access and the acting user can grant editor, sharing can promote the user to editor through the personal `source: "share"` grant.
|
|
100
|
+
- Sharing a tool also grants viewer access to required systems when the recipient lacks system access.
|
|
101
|
+
- Tool sharing is atomic. If any selected user or required system grant cannot be applied, nothing is shared.
|
|
102
|
+
- Normal users cannot unshare in V1. Admin cleanup should use Access Rules/admin grant management.
|
|
69
103
|
|
|
70
|
-
## Auto-
|
|
104
|
+
## Auto-Grant On Resource Creation
|
|
71
105
|
|
|
72
|
-
When a user creates a new tool or system, the backend automatically
|
|
106
|
+
When a user creates a new tool or system, the backend automatically grants ownership access to the creator's personal role:
|
|
73
107
|
|
|
74
|
-
- New tool created ->
|
|
75
|
-
- New system created ->
|
|
108
|
+
- New tool created -> `ownership` grant on `tool:<toolId>` with `editor`.
|
|
109
|
+
- New system created -> `ownership` grant on `system:<systemId>` with `editor`.
|
|
76
110
|
|
|
77
111
|
This only affects the creator's personal role, not base roles or additional custom roles.
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ Read these on demand — they are authoritative for their topic and kept in sync
|
|
|
25
25
|
| `sg skill redis` | Redis command syntax, connection URLs, key type handling |
|
|
26
26
|
| `sg skill sftp-smb` | SFTP, FTP, and SMB operations, file upload/download semantics, path handling |
|
|
27
27
|
| `sg skill file-handling` | File detection, parsing, `file::` reference syntax, lazy base64 access, transform-produced files |
|
|
28
|
-
| `sg skill access-rules` | RBAC roles and
|
|
28
|
+
| `sg skill access-rules` | RBAC roles, resource grants, and tool/system permissions (enterprise only) |
|
|
29
29
|
|
|
30
30
|
## CRITICAL RULES — READ FIRST
|
|
31
31
|
|
|
@@ -394,6 +394,19 @@ sourceData = {
|
|
|
394
394
|
}
|
|
395
395
|
```
|
|
396
396
|
|
|
397
|
+
### Naming Rules — Avoiding Key Collisions
|
|
398
|
+
|
|
399
|
+
Everything in `sourceData` shares ONE flat namespace, and the runtime does not detect collisions — when two sources use the same key, one silently wins and the tool misbehaves with no error. Prevent collisions at design time:
|
|
400
|
+
|
|
401
|
+
Never use these as payload input keys or step ids:
|
|
402
|
+
|
|
403
|
+
- `__files__`, `currentItem`, `sg_auth_email` — overwritten by the runtime
|
|
404
|
+
- `page`, `offset`, `cursor`, `limit`, `pageSize` — a payload key with one of these names shadows the live pagination counters; paginated steps silently stop advancing past the first page
|
|
405
|
+
- the tool's own step ids — the step result overwrites a same-named payload key for all subsequent steps
|
|
406
|
+
- credential keys available to a step (`<systemId>_<credKey>`, `<systemId>_url`, and any runtime-supplied credential names) — the credential value silently replaces the payload value
|
|
407
|
+
|
|
408
|
+
Safe naming: payload inputs get specific, domain-flavored names (`customerId`, `reportMonth`, `maxResults` — never `page`, `limit`, `cursor`, `data`); step ids are verb-prefixed camelCase (`fetchUsers`) and distinct from every payload key. If the user asks for an input named like a reserved key, use a safe alternative and explain why.
|
|
409
|
+
|
|
397
410
|
### Step Result Envelopes
|
|
398
411
|
|
|
399
412
|
**Every** step result is wrapped in `{ currentItem, data, success }`. You MUST account for this when writing data selectors or transforms.
|
|
@@ -588,6 +601,7 @@ curl -X POST "https://api.superglue.cloud/v1/hooks/{toolId}?token=$SUPERGLUE_API
|
|
|
588
601
|
- **POST for read-only ops** — GraphQL queries via POST should have `modify: false`. Don't rely on HTTP method alone
|
|
589
602
|
- **Saving without approval** — always present `sg tool run` results and ask before `sg tool save`
|
|
590
603
|
- **`sg_auth_email` in scheduled runs** — not available in scheduler-triggered executions. Tools using `<<sg_auth_email>>` will fail
|
|
604
|
+
- **Reserved key collisions** — payload inputs or step ids named after reserved/injected keys (see Naming Rules) fail silently with wrong values, never with an error
|
|
591
605
|
|
|
592
606
|
---
|
|
593
607
|
|
|
@@ -627,6 +641,7 @@ For protocol-specific error recovery (HTTP, Postgres, MSSQL, Redis, GraphQL, SFT
|
|
|
627
641
|
2. Re-run with `--include-step-results` to see the exact envelope shape
|
|
628
642
|
3. Paginated steps merge into a single `.data` field — do not `.map()` over them
|
|
629
643
|
4. Verify `sourceData.currentItem` is only referenced inside looping steps (set by the step's own `dataSelector`, not upstream)
|
|
644
|
+
5. If a step silently received the wrong value (no error thrown) or pagination stopped after one page, check for a key collision between payload inputs, step ids, credential keys, and reserved runtime keys — see Naming Rules. Fix by renaming the input, not by working around it
|
|
630
645
|
|
|
631
646
|
### Persistent failures
|
|
632
647
|
|
|
@@ -1,51 +1,73 @@
|
|
|
1
1
|
# Access Rules (RBAC)
|
|
2
2
|
|
|
3
|
-
On superglue, roles define
|
|
3
|
+
On superglue, roles define active resource grants for tools and systems. Users can have multiple roles. Roles and access rules are only available on enterprise organizations.
|
|
4
4
|
|
|
5
5
|
## Data Model
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
|
+
interface ResourceGrant {
|
|
9
|
+
roleId: string;
|
|
10
|
+
resourceRef: "tool:<encodedId>" | "system:<encodedId>" | "tool:*" | "system:*";
|
|
11
|
+
permissions: Array<"viewer" | "editor">;
|
|
12
|
+
source: "access_rule" | "ownership" | "share";
|
|
13
|
+
grantedByUserId?: string;
|
|
14
|
+
revokedAt?: Date;
|
|
15
|
+
revokedByUserId?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
8
18
|
interface Role {
|
|
9
19
|
id: string;
|
|
10
20
|
name: string;
|
|
11
21
|
description?: string;
|
|
12
|
-
|
|
13
|
-
systems: "ALL" | string[];
|
|
22
|
+
resourceGrants: ResourceGrant[];
|
|
14
23
|
isBaseRole?: boolean;
|
|
15
24
|
}
|
|
16
25
|
```
|
|
17
26
|
|
|
18
|
-
Only
|
|
27
|
+
Only active grants where `revokedAt` is empty contribute to access. `editor` implies `viewer`.
|
|
28
|
+
|
|
29
|
+
## Resource Refs
|
|
30
|
+
|
|
31
|
+
- `tool:<encodedToolId>` — one specific tool.
|
|
32
|
+
- `system:<encodedSystemId>` — one specific system.
|
|
33
|
+
- `tool:*` — every current and future tool.
|
|
34
|
+
- `system:*` — every current and future system.
|
|
19
35
|
|
|
20
|
-
|
|
36
|
+
Resource ids are URL-encoded inside `resourceRef`; use shared helpers rather than hand-building refs.
|
|
21
37
|
|
|
22
|
-
|
|
23
|
-
- `tools: ["tool-id-1", "tool-id-2"]` — only these specific tools are allowed
|
|
24
|
-
- Effective tool visibility also requires access to every system referenced by that tool's request steps
|
|
38
|
+
## Permissions
|
|
25
39
|
|
|
26
|
-
|
|
40
|
+
- `viewer` — can see and execute/use the resource.
|
|
41
|
+
- `editor` — can mutate/delete/share the resource and includes `viewer`.
|
|
27
42
|
|
|
28
|
-
|
|
29
|
-
- `systems: ["gmail", "stripe"]` — only these specific systems are allowed
|
|
30
|
-
- System access is binary by system ID: listed means allowed, omitted means denied.
|
|
43
|
+
Current configured role access and ownership grants are generally stored as `editor`.
|
|
31
44
|
|
|
32
|
-
##
|
|
45
|
+
## Grant Sources
|
|
33
46
|
|
|
34
|
-
|
|
47
|
+
- `access_rule` — explicit admin/Access Rules edit.
|
|
48
|
+
- `ownership` — authorization projection from the resource creator.
|
|
49
|
+
- `share` — explicit user-to-user sharing through the app/agent sharing flow.
|
|
35
50
|
|
|
36
|
-
|
|
37
|
-
2. The user has access to every `systemId` referenced by the tool's request steps.
|
|
51
|
+
Ownership source of truth remains the tool/system row. Ownership grants are a permission projection and should be preserved by ordinary role edits.
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
## Visibility and Execution Surfaces
|
|
54
|
+
|
|
55
|
+
- **Tools** — list/detail, agent views, VFS, REST detail, and tool history use tool `viewer`.
|
|
56
|
+
- **Systems** — list/detail, agent views, VFS, docs, credentials, and `sg system call` use system `viewer`.
|
|
57
|
+
- **Execution** — running a tool requires tool `viewer` plus system `viewer` for every referenced system.
|
|
58
|
+
- **Editing** — updating tools/systems requires `editor`.
|
|
59
|
+
- **Runs** — visible only when the user has tool `viewer` and system `viewer` for every captured system.
|
|
60
|
+
- **Schedules** — visibility follows current tool behavior; editing requires tool `editor`.
|
|
61
|
+
- **MCP** — config shows configured tools; runtime registration uses tool `viewer`, and execution still checks referenced systems.
|
|
40
62
|
|
|
41
63
|
## Multi-Role Semantics
|
|
42
64
|
|
|
43
65
|
Users can have multiple roles. Resolution is union:
|
|
44
66
|
|
|
45
|
-
| Layer | Semantics
|
|
46
|
-
| ------- |
|
|
47
|
-
| Tools | If any
|
|
48
|
-
| Systems | If any
|
|
67
|
+
| Layer | Semantics |
|
|
68
|
+
| ------- | -------------------------------------------------------------------------- |
|
|
69
|
+
| Tools | If any active grant targets a tool, that grant's permission is effective |
|
|
70
|
+
| Systems | If any active grant targets a system, that grant's permission is effective |
|
|
49
71
|
|
|
50
72
|
Assigned roles can add access but cannot remove access granted by another role.
|
|
51
73
|
|
|
@@ -53,25 +75,37 @@ Assigned roles can add access but cannot remove access granted by another role.
|
|
|
53
75
|
|
|
54
76
|
Every user has exactly one base role:
|
|
55
77
|
|
|
56
|
-
- **`admin`** — full access to everything. The admin role is immutable.
|
|
57
|
-
- **`member`** — default for org team members.
|
|
78
|
+
- **`admin`** — full access to everything. The admin role is immutable and has wildcard `editor` grants.
|
|
79
|
+
- **`member`** — default for org team members. New organizations seed it with wildcard `editor` grants for tools and systems. Access-rule grants can be narrowed. Name and description cannot be changed. Cannot be deleted.
|
|
58
80
|
|
|
59
81
|
Users can also have additional custom roles on top of their base role. Custom roles are fully editable and can be created/deleted.
|
|
60
82
|
|
|
61
83
|
## Personal Roles
|
|
62
84
|
|
|
63
|
-
|
|
85
|
+
Personal roles are per-user containers for ownership, share, and explicit access-rule grants.
|
|
64
86
|
|
|
65
87
|
- Each user can have at most one personal role.
|
|
66
|
-
-
|
|
67
|
-
- Personal role
|
|
68
|
-
- Managed via the Personal Roles tab in Access Rules
|
|
88
|
+
- Ownership grants are added automatically when a user creates a tool or system.
|
|
89
|
+
- Personal role grants are unioned with the user's other roles.
|
|
90
|
+
- Managed via the Personal Roles tab in Access Rules and backend role APIs.
|
|
91
|
+
|
|
92
|
+
## Sharing Semantics
|
|
93
|
+
|
|
94
|
+
V1 sharing targets organization users only. It does not share directly to base roles or custom roles.
|
|
95
|
+
|
|
96
|
+
- Sharing writes `source: "share"` grants into the target user's personal role.
|
|
97
|
+
- A user can grant only permissions up to their own effective access: viewer can grant viewer, editor can grant viewer or editor.
|
|
98
|
+
- If the target already has the requested permission or stronger from any active grant, sharing is redundant and should be blocked.
|
|
99
|
+
- If the target has viewer access and the acting user can grant editor, sharing can promote the user to editor through the personal `source: "share"` grant.
|
|
100
|
+
- Sharing a tool also grants viewer access to required systems when the recipient lacks system access.
|
|
101
|
+
- Tool sharing is atomic. If any selected user or required system grant cannot be applied, nothing is shared.
|
|
102
|
+
- Normal users cannot unshare in V1. Admin cleanup should use Access Rules/admin grant management.
|
|
69
103
|
|
|
70
|
-
## Auto-
|
|
104
|
+
## Auto-Grant On Resource Creation
|
|
71
105
|
|
|
72
|
-
When a user creates a new tool or system, the backend automatically
|
|
106
|
+
When a user creates a new tool or system, the backend automatically grants ownership access to the creator's personal role:
|
|
73
107
|
|
|
74
|
-
- New tool created ->
|
|
75
|
-
- New system created ->
|
|
108
|
+
- New tool created -> `ownership` grant on `tool:<toolId>` with `editor`.
|
|
109
|
+
- New system created -> `ownership` grant on `system:<systemId>` with `editor`.
|
|
76
110
|
|
|
77
111
|
This only affects the creator's personal role, not base roles or additional custom roles.
|