Conversation
packages/frontend/editor-ui/src/features/project-roles/ProjectRoleView.vue
Show resolved
Hide resolved
packages/frontend/editor-ui/src/features/project-roles/ProjectRoleView.vue
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Bundle ReportChanges will increase total bundle size by 333 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: editor-ui-esmAssets Changed:
Files in
Files in
|
Contributor
There was a problem hiding this comment.
cubic analysis
No issues found across 5 files
Linked issue analysis
Linked issue: IAM-118: [FE] Show workflow:execute scope checkbox in Custom role UI
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Workflow:execute scope should be added to the custom roles UI to toggle on/off | Added execute in scopes, UI, i18n and tests |
| ✅ | Decouple workflow:execute from workflow:update and enforce read prerequisite (checking workflow:execute auto-checks workflow:read; unchecking workflow:read auto-unchecks workflow:execute) | toggleScope updated and tests cover dependency scenarios |
| ❌ | When a user has workflow:edit and workflow:execute, UI should show execute workflow button | No editor execution button visibility changes in diffs |
| ❌ | When a user only has workflow:view and workflow:execute, UI should allow user to execute workflow but editing anything else on the canvas should stay in read only state | No editor UI changes to allow execute-only behavior |
| ❌ | When a user has workflow:read and workflow:edit but not workflow:execute, test execution button should be greyed out and show you do not have permissions on hover | No code to disable/tooltip execution button in editor |
| ❌ | A user with workflow:execute can only execute workflows that already exist & the user has access to (including rerunning prev executions) | No backend or execution permission enforcement changes found |
| ❌ | Handle the above scenarios when viewing executions too (able to re-run failed executions if you have the execute permission) | No changes to executions view or rerun permission logic |
Architecture diagram
sequenceDiagram
participant User
participant UI as ProjectRoleView (Vue)
participant State as form.scopes (Local State)
participant Config as projectRoleScopes.ts
participant I18n as en.json
Note over UI,Config: UI Initialization
UI->>Config: Get list of UI_OPERATIONS
Config-->>UI: NEW: Return workflow operations including 'execute'
UI->>I18n: Fetch labels and tooltips
I18n-->>UI: NEW: 'workflow:execute' tooltip added
Note over User,State: Scenario A: User enables 'workflow:execute'
User->>UI: Click 'workflow:execute' checkbox
UI->>UI: toggleScope('workflow:execute')
alt NEW: Scope added AND 'workflow:read' is missing
UI->>UI: Internal: toggleScope('workflow:read')
UI->>State: Add 'workflow:read' to array
end
UI->>State: Add 'workflow:execute' to array
Note over User,State: Scenario B: User disables 'workflow:read'
User->>UI: Uncheck 'workflow:read' checkbox
UI->>UI: toggleScope('workflow:read')
alt NEW: Scope removed AND 'workflow:execute' is present
UI->>UI: Internal: toggleScope('workflow:execute')
UI->>State: Remove 'workflow:execute' from array
end
UI->>State: Remove 'workflow:read' from array
Note over User,State: Scenario C: CHANGED interaction for 'workflow:update'
User->>UI: Toggle 'workflow:update' checkbox
UI->>UI: toggleScope('workflow:update')
UI->>State: Add/Remove 'workflow:update'
Note right of UI: CHANGED: No longer triggers workflow:execute
Merged
Tuukkaa
pushed a commit
that referenced
this pull request
Mar 2, 2026
Contributor
|
Got released with |
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
Adds
workflow:executeas an explicit, toggleable checkbox in the custom role editor under the Workflows section.Previously,
workflow:executewas a hidden scope that was silently auto-toggled wheneverworkflow:updatewas toggled — creating confusing, unexpected dependency behaviour. This PR promotes it to a first-class permission in the UI.Dependency rule enforced in the UI:
workflow:executeautomatically checksworkflow:readif it isn't already selected (execute requires read)workflow:readautomatically unchecksworkflow:execute(read is a prerequisite for execute)workflow:readdoes not requireworkflow:executeChanges:
projectRoleScopes.ts: Added'execute'to the workflow operations list, placed betweenreadandupdateProjectRoleView.vue: Replaced theworkflow:update → workflow:executeauto-coupling with explicitworkflow:read ↔ workflow:executedependency logic intoggleScopeen.json: AddedprojectRoles.workflow:execute.tooltipand updatedworkflow:update.tooltipto remove the now-stale "and execute workflows" phrasingProjectRoleView.test.ts: Added 6 tests covering all dependency scenarios and confirming the old auto-coupling is removedRelated Linear tickets, Github issues, and Community forum posts
closes https://linear.app/n8n/issue/IAM-118/fe-show-workflowexecute-scope-checkbox-in-custom-role-ui
Review / Merge checklist