feat(backend): add share-file action node#26
Open
LukasHirt wants to merge 2 commits into
Open
Conversation
Grants viewer/editor access on a workflow's current file to a user or group
via oCIS's Graph API, following the same GraphClient.ResolveItemID pattern
tag/comment already use. Adds GraphClient.Share plus a recipient-resolution
helper (email/group name -> Graph user/group id) and a "share" runAction case.
The invite endpoint shape (POST /graph/v1.0/drives/{driveID}/items/{itemID}/
invite) and its request body are inferred from this codebase's existing Graph
client conventions and general oCIS/libre-graph API knowledge, not verified
against a live oCIS instance -- see the doc comment on Share for specifics.
Tests cover the runAction wiring (template rendering, ResolveItemID -> Share
call, default role, missing-recipient failure) via the existing fakeGraph
mock; no new HTTP-level test harness was added since ocisclient has none yet.
Signed-off-by: Lukas Hirt <info@hirt.cz>
Adds a "Share File" entry to the Actions palette (action-share, actionType "share") mirroring the existing tag/comment action pattern: a recipient text input (rendered against workflow vars server-side, like every other action param) and a viewer/editor role select in NodeDetailsPanel.vue, matching the select-field convention already used for trigger/event type. Covered by new Vitest specs: nodeTypes.spec.ts asserts the node type is registered under the Actions category and discoverable like other actions; NodeDetailsPanel.spec.ts mounts the panel (stubbing oc-icon/oc-button/ oc-text-input, the first component-mount test in this suite) to assert the recipient input and role select are wired to actionParams and emit updates. Signed-off-by: Lukas Hirt <info@hirt.cz>
LukasHirt
force-pushed
the
feat/action-share-file
branch
from
July 24, 2026 20:56
32ba662 to
88e5155
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the "Share File" action node end to end:
actionType: 'share'grants viewer/editor access on the workflow's current file to a specified user or group via oCIS's Graph API, the same patterntag/commentalready established for Graph-only (non-WebDAV) actions.GraphClient.Share(ctx, authHeader, itemID, recipient, role)inbackend/pkg/ocisclient/share.go, plus a small recipient-resolution helper that looks up a user, then a group, by search term. Wired intorunAction's newcase "share":inbackend/pkg/executor/executor.go, which renders therecipienttemplate againstvars(like every other action param), resolves the item id via the existingResolveItemID, defaultsroleto"viewer", and setsresult.Output = recipient.action-shareentry inNODE_TYPES(frontend/src/nodeTypes.ts) under the Actions category, withrecipient(text input) androle(viewer/editor select) fields added toNodeDetailsPanel.vue, mirroring thetag/commentfield-rendering pattern and the existing select-field convention used for trigger/event type.Test plan
cd backend && go build ./... && go vet ./... && go test ./...cd frontend && npm run test:unit && npm run check:types && npm run lint && npm run buildreuse lint🤖 Generated with Claude Code