mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-01 09:17:08 +02:00
fix(core): Fix mcp access scope issue (#22031)
This commit is contained in:
parent
ad1e422bab
commit
eb6cbfc5e3
|
|
@ -1,6 +1,15 @@
|
|||
import { ModuleRegistry, Logger } from '@n8n/backend-common';
|
||||
import { type AuthenticatedRequest, WorkflowEntity } from '@n8n/db';
|
||||
import { Body, Post, Get, Patch, RestController, GlobalScope, Param } from '@n8n/decorators';
|
||||
import {
|
||||
Body,
|
||||
Post,
|
||||
Get,
|
||||
Patch,
|
||||
RestController,
|
||||
GlobalScope,
|
||||
Param,
|
||||
ProjectScope,
|
||||
} from '@n8n/decorators';
|
||||
import type { Response } from 'express';
|
||||
|
||||
import { UpdateMcpSettingsDto } from './dto/update-mcp-settings.dto';
|
||||
|
|
@ -57,7 +66,7 @@ export class McpSettingsController {
|
|||
return await this.mcpServerApiKeyService.rotateMcpServerApiKey(req.user);
|
||||
}
|
||||
|
||||
@GlobalScope('mcp:manage')
|
||||
@ProjectScope('workflow:update')
|
||||
@Patch('/workflows/:workflowId/toggle-access')
|
||||
async toggleWorkflowMCPAccess(
|
||||
req: AuthenticatedRequest,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user