Repository navigation
feat(access-control): share saved pipelines and honour inherited run scopes - #2856
Closed
morgan-wowk wants to merge 1 commit into
Closed
morgan-wowk wants to merge 1 commit into
morgan-wowk wants to merge 1 commit into
Conversation
🎩 PreviewA preview build has been created at: |
morgan-wowk
force-pushed
the
access-control-mvp
branch
3 times, most recently
from
October 8, 2026 01:24
4c8d04e to
08b3a0d
Compare
morgan-wowk
force-pushed
the
access-control-mvp
branch
2 times, most recently
from
October 15, 2026 22:47
bc32f5a to
7fd995b
Compare
…scopes
Adds src/components/shared/AccessControl, the UI half of the RBAC MVP, wired
into the v2 run view only:
- accessControlApi: hand-written calls for GET/PUT /api/access_control/{type}/{id}
and GET .../my_scopes. Errors read `detail`, then `message`, then the status.
- useRunPermissions: the run's creator can cancel and annotate as before; anyone
else asks the backend for the run:* scopes they inherit from the run's saved
pipeline (tangleml.com/user-pipeline/pipeline-id). Backends without the
endpoint answer with an error, which reads as "no scopes", so the behaviour
there is unchanged.
- ManageAccessDialog / ManageAccessButton: list who has operate/edit/manage on
the run's saved pipeline. Holders of pipeline:share can add, change and remove
people. Saves send the full list plus the last-seen revision; a 409 refetches.
The backend's run-as-owner note is shown above the list as an info box.
Only the owner can add or change secrets, so a non-owner with edit sees a
one-line tip naming the owner, and the role summary says edit excludes them.
In the v2 run view, Cancel (RunActionsBar, RunMenu, RunToolsContent) follows
canCancel and the notes editor (RunDetailsContent) follows canAnnotate. The
access button sits in the run actions bar and only appears when the run came
from a saved pipeline the caller holds some
scope on (the access list itself is only readable by people it names). The v1 run view is unchanged.
morgan-wowk
force-pushed
the
access-control-mvp
branch
from
October 20, 2026 02:42
7fd995b to
e166557
Compare
Author
|
Closing for now. The UI work will be revisited later in new PRs; the backend changes continue in TangleML/tangle#387 and https://github.com/Shopify/oasis-backend/pull/745. |
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.
Manage who can operate, edit or manage a saved pipeline from the run view. Cancel and Run Notes now follow the run scopes inherited from the pipeline, not only "you started this run".
Where to find it
The Manage pipeline access button sits in the v2 run view's actions bar, next to the run status. It appears only when the run came from a saved pipeline that the viewer holds some scope on. The access list is only readable by people it names, so anyone else doesn't see the button.
Dialog
operategrant: Cancel run (v2 run view)This change is v2 only; the v1 run view is unchanged. All screenshots are from the v2 run view. They come from the oasis-frontend screenshot E2E against this branch (https://github.com/Shopify/oasis-frontend/pull/731).
Secrets stay with the owner
Edit changes everything except secrets. The backend refuses an editor's save that adds, swaps or removes a secret, changes a task that takes one, or changes an input such a task reads (https://github.com/Shopify/oasis-backend/pull/745). The UI points editors to the owner rather than letting them hit that error.
In the dialog, an editor who isn't the owner sees one line naming who to ask:
There's no UI on
masterthat edits a saved pipeline yet, so the editor tips are shown in a throwaway PR built on the remote-pipeline work: #2857UX
flowchart TD run["Run view"] --> ann{"run has pipeline-id annotation?"} ann -- no --> creator["creator-only Cancel and Notes, as before"] ann -- yes --> pscopes["GET my_scopes for the pipeline"] pscopes --> granted{"any scope?"} granted -- yes --> btn["Manage pipeline access button"] granted -- no --> nobtn["no button"] ann -- yes --> scopes["GET my_scopes for the run"] scopes --> cancel["Cancel shown with run:cancel"] scopes --> notes["Notes editable with run:annotate"] btn --> dialog["Manage access dialog"] dialog --> share{"caller has pipeline:share?"} share -- yes --> edit["edit rows, Save sends users and revision"] share -- no --> ro["read-only rows"]API model
sequenceDiagram participant UI as tangle-ui participant API as oasis-backend participant DB as extra_data UI->>API: GET /api/access_control/pipeline/ID API->>DB: read access_control alt caller holds any scope API-->>UI: owner, users, history, revision, my_scopes, warning else no grant API-->>UI: 403 end UI->>API: PUT /api/access_control/pipeline/ID with users and revision API->>DB: lock row, compare revision alt revision matches and caller has pipeline:share API->>DB: write users, append history entry API-->>UI: 200 with the new state else revision is stale API-->>UI: 409 else no pipeline:share API-->>UI: 403 endCode lives in
src/components/shared/AccessControl/. The other edits swapisRunCreatorforcanCancelandcanAnnotate.Scopes
operaterun:cancel,run:annotateeditpipeline:update(rename included)managepipeline:delete,pipeline:shareOwners and admins hold every scope. Runs inherit
run:*from their saved pipeline. Starting a run isn't a scope: anyone can run a saved pipeline, as on prod today.Related
🤖 Generated with Claude Code