| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- {
- "name": "verify-workflow-own-collection-granted",
- "comment": "A workflow reaches its own private storage as \"@self\" without being granted anything, and the collection is created on first write rather than having to exist first. Reading it back matters as much as writing: a grant that only covers writes would store data the workflow could never use.",
- "nodes": [
- {
- "id": "n1",
- "name": "Trigger",
- "type": "click-trigger",
- "position": { "x": 0, "y": 0 },
- "config": {}
- },
- {
- "id": "write",
- "name": "Write to own storage",
- "type": "storage-insert",
- "position": { "x": 0, "y": 100 },
- "config": {
- "collectionSource": "manual",
- "collectionManual": "@self",
- "documentId": "probe",
- "documentData": "{\"probe\": \"own-collection\"}"
- }
- },
- {
- "id": "read",
- "name": "Read it back",
- "type": "storage-get",
- "position": { "x": 0, "y": 200 },
- "config": {
- "collectionSource": "manual",
- "collectionManual": "@self",
- "documentId": "probe"
- }
- }
- ],
- "connections": [
- {
- "sourceNodeId": "n1",
- "sourceOutput": "main",
- "targetNodeId": "write",
- "targetInput": "data"
- },
- {
- "sourceNodeId": "write",
- "sourceOutput": "main",
- "targetNodeId": "read",
- "targetInput": "data"
- }
- ],
- "expect": {
- "write": {
- "status": "completed",
- "output": { "success": true }
- },
- "read": {
- "status": "completed",
- "output": { "found": true, "document": { "probe": "own-collection" } }
- }
- }
- }
|