mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(core): Rebuild project roles to load from the database (#17909)
This commit is contained in:
committed by
GitHub
parent
ab7998b441
commit
f757790394
@@ -1,12 +1,6 @@
|
||||
import type { User, ExecutionSummaries } from '@n8n/db';
|
||||
import { Get, Patch, Post, RestController } from '@n8n/decorators';
|
||||
import type { Scope } from '@n8n/permissions';
|
||||
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import { License } from '@/license';
|
||||
import { isPositiveInteger } from '@/utils';
|
||||
import { WorkflowSharingService } from '@/workflows/workflow-sharing.service';
|
||||
import { PROJECT_OWNER_ROLE_SLUG, type Scope } from '@n8n/permissions';
|
||||
|
||||
import { ExecutionService } from './execution.service';
|
||||
import { EnterpriseExecutionsService } from './execution.service.ee';
|
||||
@@ -14,6 +8,12 @@ import { ExecutionRequest } from './execution.types';
|
||||
import { parseRangeQuery } from './parse-range-query.middleware';
|
||||
import { validateExecutionUpdatePayload } from './validation';
|
||||
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import { License } from '@/license';
|
||||
import { isPositiveInteger } from '@/utils';
|
||||
import { WorkflowSharingService } from '@/workflows/workflow-sharing.service';
|
||||
|
||||
@RestController('/executions')
|
||||
export class ExecutionsController {
|
||||
constructor(
|
||||
@@ -29,7 +29,7 @@ export class ExecutionsController {
|
||||
} else {
|
||||
return await this.workflowSharingService.getSharedWorkflowIds(user, {
|
||||
workflowRoles: ['workflow:owner'],
|
||||
projectRoles: ['project:personalOwner'],
|
||||
projectRoles: [PROJECT_OWNER_ROLE_SLUG],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user