mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-13 15:25:39 +01:00
add permissions to roles
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { Exclude } from 'class-transformer';
|
||||
import { IsArray, IsEnum, IsNotEmpty, IsOptional } from 'class-validator';
|
||||
import { Roles, RolesList } from '../dto/roles.dto';
|
||||
import {
|
||||
IsArray, IsNotEmpty,
|
||||
IsOptional,
|
||||
IsString
|
||||
} from 'class-validator';
|
||||
import { Roles } from '../dto/roles.dto';
|
||||
|
||||
export class EUser {
|
||||
@IsOptional()
|
||||
@@ -10,7 +14,7 @@ export class EUser {
|
||||
username: string;
|
||||
|
||||
@IsArray()
|
||||
@IsEnum(RolesList, { each: true })
|
||||
@IsString({ each: true })
|
||||
roles: Roles;
|
||||
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user