Skip to content

fix: Admin should be able to install community nodes#26296

Merged
dlavrenuek merged 10 commits intomasterfrom
NODE-4258/community-issue-cant-install-community-node-as-admin
Feb 27, 2026
Merged

fix: Admin should be able to install community nodes#26296
dlavrenuek merged 10 commits intomasterfrom
NODE-4258/community-issue-cant-install-community-node-as-admin

Conversation

@dlavrenuek
Copy link
Contributor

@dlavrenuek dlavrenuek commented Feb 26, 2026

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

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@dlavrenuek dlavrenuek self-assigned this Feb 26, 2026
@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Feb 26, 2026
@dlavrenuek dlavrenuek changed the title Node 4258/community issue cant install community node as admin fix: Admins cant install community nodes Feb 26, 2026
@dlavrenuek dlavrenuek changed the title fix: Admins cant install community nodes fix: Admin should be able to install community nodes Feb 26, 2026
@codecov
Copy link

codecov bot commented Feb 26, 2026

Bundle Report

Changes will increase total bundle size by 25.89kB (0.06%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
editor-ui-esm 42.49MB 25.89kB (0.06%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: editor-ui-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/worker-*.js 2.91MB 2.92MB 21725.55% ⚠️
assets/worker-*.js -2.91MB 13.37kB -99.54%
assets/constants-*.js 260 bytes 2.89MB 0.01%
assets/src-*.js 686 bytes 2.22MB 0.03%
assets/ParameterInputList-*.js 25 bytes 1.47MB 0.0%
assets/index-*.js -13.55kB 1.13MB -1.19%
assets/RunData-*.js 26 bytes 1.06MB 0.0%
assets/users.store-*.js 456 bytes 1.06MB 0.04%
assets/index-*.css -2.71kB 768.58kB -0.35%
assets/ChatView-*.js 13.95kB 674.78kB 2.11%
assets/_MapCache-*.js 1.21kB 575.82kB 0.21%
assets/src-*.css 123 bytes 475.1kB 0.03%
assets/useCanvasMapping-*.js 178 bytes 442.55kB 0.04%
assets/WorkflowDiffView-*.js 1.11kB 202.49kB 0.55%
assets/WorkflowsView-*.js 27 bytes 195.95kB 0.01%
assets/NodeView-*.js 315 bytes 146.47kB 0.22%
assets/usePostMessageHandler-*.js 159 bytes 124.31kB 0.13%
assets/useCanvasMapping-*.css -20 bytes 113.09kB -0.02%
assets/NodeCreator-*.js 76 bytes 100.92kB 0.08%
assets/ChatView-*.css 4.17kB 94.05kB 4.64%
assets/WorkflowLayout-*.js 12 bytes 87.83kB 0.01%
assets/NodeSettings-*.js 20 bytes 82.69kB 0.02%
assets/WorkflowHistory-*.js 11.96kB 54.51kB 28.1% ⚠️
assets/chat.store-*.js 622 bytes 49.66kB 1.27%
assets/merge-*.js 28 bytes 27.14kB 0.1%
assets/useRunWorkflow-*.js 87 bytes 26.0kB 0.34%
assets/WorkflowHistory-*.css 6.17kB 22.53kB 37.68% ⚠️
assets/CanvasRunWorkflowButton-*.js 103 bytes 22.2kB 0.47%
assets/WorkflowDiffView-*.css 51 bytes 19.39kB 0.26%
assets/CommunityNodeUpdateInfo-*.js -1 bytes 8.21kB -0.01%
assets/ContactAdministratorToInstall-*.js -10 bytes 5.29kB -0.19%
assets/utils-*.js 358 bytes 1.93kB 22.82% ⚠️

Files in assets/users.store-*.js:

  • ./src/features/settings/users/users.store.ts → Total Size: 11.03kB

Files in assets/WorkflowsView-*.js:

  • ./src/experiments/credentialsAppSelection/components/AppInstallModal.vue → Total Size: 368 bytes

Files in assets/NodeCreator-*.js:

  • ./src/features/settings/communityNodes/components/nodeCreator/CommunityNodeInfo.vue → Total Size: 385 bytes

  • ./src/features/settings/communityNodes/components/nodeCreator/CommunityNodeInstallHint.vue → Total Size: 415 bytes

  • ./src/features/shared/nodeCreator/components/Modes/ActionsMode.vue → Total Size: 350 bytes

  • ./src/features/settings/communityNodes/components/nodeCreator/CommunityNodeDetails.vue → Total Size: 397 bytes

Files in assets/NodeSettings-*.js:

  • ./src/features/ndv/settings/components/NodeSettingsInvalidNodeWarning.vue → Total Size: 414 bytes

Files in assets/CommunityNodeUpdateInfo-*.js:

  • ./src/features/settings/communityNodes/composables/useInstalledCommunityPackage.ts → Total Size: 1.32kB

Files in assets/ContactAdministratorToInstall-*.js:

  • ./src/features/settings/communityNodes/composables/useInstallNode.ts → Total Size: 2.31kB

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...Nodes/components/nodeCreator/CommunityNodeInfo.vue 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dlavrenuek dlavrenuek enabled auto-merge February 26, 2026 15:00
Copy link
Contributor

@RomanDavydchuk RomanDavydchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Viewing as instance owner:
Image

Viewing as admin:
Image

const installNode = async (props: InstallNodeProps): Promise<InstallNodeResult> => {
if (!isOwner.value) {
if (!canInstallNodes.value) {
const error = new Error('User is not an owner');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should update the error message to be in line with new behavior:

Suggested change
const error = new Error('User is not an owner');
const error = new Error('User is not an owner or an admin');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

dlavrenuek and others added 3 commits February 27, 2026 10:33
…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
const i18n = useI18n();

const { userActivated, isInstanceOwner } = useUsersStore();
const usersStore = useUsersStore();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

@RomanDavydchuk RomanDavydchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dlavrenuek dlavrenuek added this pull request to the merge queue Feb 27, 2026
Merged via the queue into master with commit e01ce10 Feb 27, 2026
53 checks passed
@dlavrenuek dlavrenuek deleted the NODE-4258/community-issue-cant-install-community-node-as-admin branch February 27, 2026 23:10
@n8n-assistant n8n-assistant bot mentioned this pull request Mar 2, 2026
Tuukkaa pushed a commit that referenced this pull request Mar 2, 2026
Co-authored-by: RomanDavydchuk <roman.davydchuk@n8n.io>
This was referenced Mar 3, 2026
@n8n-assistant
Copy link
Contributor

n8n-assistant bot commented Mar 3, 2026

Got released with n8n@2.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

n8n team Authored by the n8n team Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cant install community node as admin

2 participants