mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 05:29:44 +02:00
feat(core): Add nodeTypePolicy RBAC scope and license flag (no-changelog) (#37538)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
4608fd236c
commit
344e8b1d27
|
|
@ -12,6 +12,7 @@ export * from './uuid';
|
|||
export const LICENSE_FEATURES = {
|
||||
SHARING: 'feat:sharing',
|
||||
LDAP: 'feat:ldap',
|
||||
NODE_TYPE_POLICIES: 'feat:nodeTypePolicies',
|
||||
SAML: 'feat:saml',
|
||||
OIDC: 'feat:oidc',
|
||||
MFA_ENFORCEMENT: 'feat:mfaEnforcement',
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ exports[`Scope Information > ensure scopes are defined correctly 1`] = `
|
|||
"ldap:manage",
|
||||
"license:manage",
|
||||
"logStreaming:manage",
|
||||
"nodeTypePolicy:manage",
|
||||
"orchestration:read",
|
||||
"orchestration:list",
|
||||
"project:create",
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export const RESOURCES = {
|
|||
ldap: ['sync', 'manage'] as const,
|
||||
license: ['manage'] as const,
|
||||
logStreaming: ['manage'] as const,
|
||||
nodeTypePolicy: ['manage'] as const,
|
||||
orchestration: ['read', 'list'] as const,
|
||||
// `manageMembers` gates changes to a project's membership list: adding a member
|
||||
// with a role, changing a member's role, and removing a member. Kept separate
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export const GLOBAL_OWNER_SCOPES: Scope[] = [
|
|||
'ldap:sync',
|
||||
'license:manage',
|
||||
'logStreaming:manage',
|
||||
'nodeTypePolicy:manage',
|
||||
'orchestration:read',
|
||||
'saml:manage',
|
||||
'securityAudit:generate',
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@ export const scopeInformation: Partial<Record<Scope, ScopeInformation>> = {
|
|||
displayName: 'Manage AI Usage',
|
||||
description: 'Allows managing AI Usage settings.',
|
||||
},
|
||||
'nodeTypePolicy:manage': {
|
||||
displayName: 'Manage Node Type Policies',
|
||||
description: 'Allows managing which node types are available on the instance.',
|
||||
},
|
||||
'encryptionKey:manage': {
|
||||
displayName: 'Manage Encryption Keys',
|
||||
description: 'Allows listing and rotating instance encryption keys.',
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ describe('permissions', () => {
|
|||
ldap: {},
|
||||
license: {},
|
||||
logStreaming: {},
|
||||
nodeTypePolicy: {},
|
||||
oidc: {},
|
||||
orchestration: {},
|
||||
project: {},
|
||||
|
|
@ -117,6 +118,7 @@ describe('permissions', () => {
|
|||
ldap: {},
|
||||
license: {},
|
||||
logStreaming: {},
|
||||
nodeTypePolicy: {},
|
||||
orchestration: {},
|
||||
project: {
|
||||
list: true,
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ export class E2EController {
|
|||
[LICENSE_FEATURES.DYNAMIC_CREDENTIALS]: false,
|
||||
[LICENSE_FEATURES.SHARING]: false,
|
||||
[LICENSE_FEATURES.LDAP]: false,
|
||||
[LICENSE_FEATURES.NODE_TYPE_POLICIES]: false,
|
||||
[LICENSE_FEATURES.SAML]: false,
|
||||
[LICENSE_FEATURES.LOG_STREAMING]: false,
|
||||
[LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS]: false,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export const useRBACStore = defineStore(STORES.RBAC, () => {
|
|||
ldap: {},
|
||||
license: {},
|
||||
logStreaming: {},
|
||||
nodeTypePolicy: {},
|
||||
saml: {},
|
||||
oidc: {},
|
||||
provisioning: {},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user