refactor(core): Setup decorator based RBAC (no-changelog) (#5787)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-04-24 09:45:31 +00:00
committed by GitHub
parent feb2ba09b9
commit 1eeadc6114
23 changed files with 133 additions and 165 deletions

View File

@@ -1,6 +1,6 @@
import validator from 'validator';
import { validateEntity } from '@/GenericHelpers';
import { Get, Post, RestController } from '@/decorators';
import { Authorized, Get, Post, RestController } from '@/decorators';
import { BadRequestError } from '@/ResponseHelper';
import {
hashPassword,
@@ -20,6 +20,7 @@ import type {
WorkflowRepository,
} from '@db/repositories';
@Authorized(['global', 'owner'])
@RestController('/owner')
export class OwnerController {
private readonly config: Config;