fix: Admin should be able to install community nodes#26296
fix: Admin should be able to install community nodes#26296dlavrenuek merged 10 commits intomasterfrom
Conversation
Bundle ReportChanges will increase total bundle size by 25.89kB (0.06%) ⬆️. 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
Files in
Files in
Files in
Files in
|
There was a problem hiding this comment.
cubic analysis
4 issues found across 8 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/frontend/editor-ui/src/features/settings/communityNodes/components/nodeCreator/CommunityNodeInfo.vue">
<violation number="1" location="packages/frontend/editor-ui/src/features/settings/communityNodes/components/nodeCreator/CommunityNodeInfo.vue:40">
P2: Owner accounts are excluded by the new `isAdmin` guard, so instance owners will still see the “contact administrator” UI despite being allowed to install community nodes. According to linked Linear issue NODE-4258, admins should be able to install nodes without removing owner capability, so include owners in this check.</violation>
</file>
<file name="packages/frontend/editor-ui/src/experiments/credentialsAppSelection/components/AppInstallModal.vue">
<violation number="1" location="packages/frontend/editor-ui/src/experiments/credentialsAppSelection/components/AppInstallModal.vue:35">
P2: `isAdmin` now excludes instance owners, so owners will be blocked from installing and see the “Contact Administrator” messaging. Include instance owners in the install permission check so the previous owner capability isn’t lost while enabling admins.</violation>
</file>
<file name="packages/frontend/editor-ui/src/features/ndv/settings/components/NodeSettingsInvalidNodeWarning.vue">
<violation number="1" location="packages/frontend/editor-ui/src/features/ndv/settings/components/NodeSettingsInvalidNodeWarning.vue:38">
P2: Using `isAdmin` alone blocks instance owners from the install UI even though owners are a distinct role. Allow both admin and owner to see the install actions to avoid regressing owner access.</violation>
</file>
<file name="packages/frontend/editor-ui/src/features/settings/communityNodes/composables/useInstallNode.ts">
<violation number="1" location="packages/frontend/editor-ui/src/features/settings/communityNodes/composables/useInstallNode.ts:59">
P1: According to linked Linear issue NODE-4258, admins should be able to install community nodes, but owners already could. This guard now checks only `isAdmin`, which blocks instance owners (ROLE.Owner) from installing community nodes. Allow both owner and admin so the fix doesn’t regress owner access.</violation>
</file>
Linked issue analysis
Linked issue: NODE-4258: Community Issue - Cant install community node as admin
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | UI shows install button for instance admins (admin role reflected in UI) | Replaced isInstanceOwner checks with isAdmin in UI components |
| ✅ | Non-admin users see ContactAdministratorToInstall and cannot install | ContactAdministratorToInstall v-if updated to !isAdmin |
| ✅ | installNode API/composable enforces admin-only installation (prevents non-admin installs) | installNode now checks isAdmin before proceeding |
| ✅ | Install handler only runs when package present and user is admin | handleInstall returns early if no packageName or not isAdmin |
| ✅ | Unit tests updated to reflect isAdmin checks to prevent regression | Multiple tests switched from isInstanceOwner to isAdmin |
Architecture diagram
sequenceDiagram
participant Admin as User (Admin/Owner)
participant UI as Vue Components (AppInstallModal/Info)
participant Store as Users Store
participant Logic as useInstallNode (Composable)
participant API as Backend API
Note over Admin,API: Permission Check & UI Rendering
UI->>Store: Get current user role
Store-->>UI: isAdmin status
alt CHANGED: User is Admin or Owner
UI->>UI: Show [Install] Button
else User is NOT Admin
UI->>UI: Show "Contact Administrator" message
end
Note over Admin,API: Installation Flow (Happy Path)
Admin->>UI: Click "Install"
UI->>Logic: installNode(packageDetails)
Logic->>Store: CHANGED: Validate isAdmin
alt Validation Passed
Logic->>API: POST /community-packages (install)
API-->>Logic: Success Response
Logic->>UI: Trigger success toast/refresh
else Validation Failed
Logic->>UI: Show Error Toast (Unauthorized)
end
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
packages/frontend/editor-ui/src/features/settings/communityNodes/composables/useInstallNode.ts
Outdated
Show resolved
Hide resolved
.../editor-ui/src/features/settings/communityNodes/components/nodeCreator/CommunityNodeInfo.vue
Outdated
Show resolved
Hide resolved
...es/frontend/editor-ui/src/experiments/credentialsAppSelection/components/AppInstallModal.vue
Outdated
Show resolved
Hide resolved
...s/frontend/editor-ui/src/features/ndv/settings/components/NodeSettingsInvalidNodeWarning.vue
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
RomanDavydchuk
left a comment
There was a problem hiding this comment.
Mostly looks good, left one small comment about the error message. More importantly, for the state when the community node is not installed in the node creator, I still don't see the install button, although the banner to contact the admin has disappeared. I think we should also update CommunityNodeDetails.vue
| const installNode = async (props: InstallNodeProps): Promise<InstallNodeResult> => { | ||
| if (!isOwner.value) { | ||
| if (!canInstallNodes.value) { | ||
| const error = new Error('User is not an owner'); |
There was a problem hiding this comment.
I think we should update the error message to be in line with new behavior:
| const error = new Error('User is not an owner'); | |
| const error = new Error('User is not an owner or an admin'); |
There was a problem hiding this comment.
@RomanDavydchuk I did search through the code base and found/updated more places with owner checks related to node installation/management. Now the admin will also see the buttons to manage and update nodes - they already had the rights to do so (in the backend/role/scope), it was only not displayed.
…es/composables/useInstallNode.ts Co-authored-by: RomanDavydchuk <roman.davydchuk@n8n.io>
…nstall-community-node-as-admin' into NODE-4258/community-issue-cant-install-community-node-as-admin # Conflicts: # packages/frontend/editor-ui/src/features/settings/communityNodes/composables/useInstallNode.ts
...d/editor-ui/src/features/settings/communityNodes/composables/useInstalledCommunityPackage.ts
Show resolved
Hide resolved
packages/frontend/editor-ui/src/features/settings/communityNodes/composables/useInstallNode.ts
Show resolved
Hide resolved
| const i18n = useI18n(); | ||
|
|
||
| const { userActivated, isInstanceOwner } = useUsersStore(); | ||
| const usersStore = useUsersStore(); |
There was a problem hiding this comment.
With destructuring these values did lose reactivity, so it's possible that they are updated after the view was rendered, which was not reflected in the view
Co-authored-by: RomanDavydchuk <roman.davydchuk@n8n.io>
|
Got released with |


Summary
Fixes a bug that prevented instance admin from installing community packages. The admin role already had the permissions (scope) to install packages but it was not reflected in the UI
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-4258/community-issue-cant-install-community-node-as-admin
Fixes #24797
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)