chore(core): Use roles from database in global roles (#18768)

This commit is contained in:
Andreas Fitzek
2025-08-26 17:53:46 +02:00
committed by GitHub
parent cff3f4a67e
commit ecad12b77a
117 changed files with 956 additions and 424 deletions

View File

@@ -564,7 +564,7 @@ export class WorkflowsController {
@Post('/with-node-types')
async getWorkflowsWithNodesIncluded(req: AuthenticatedRequest, res: express.Response) {
try {
const hasPermission = req.user.role === ROLE.Owner || req.user.role === ROLE.Admin;
const hasPermission = req.user.role.slug === ROLE.Owner || req.user.role.slug === ROLE.Admin;
if (!hasPermission) {
res.json({ data: [], count: 0 });