roles update
This commit is contained in:
@@ -33,6 +33,30 @@ export class AssignUserRoleDto {
|
||||
roleSlug!: string;
|
||||
}
|
||||
|
||||
export class AssignUserPermissionDto {
|
||||
@ApiProperty({ description: 'Slug права', example: 'oauth.manage' })
|
||||
@IsString({ message: 'Slug права должен быть строкой' })
|
||||
permissionSlug!: string;
|
||||
}
|
||||
|
||||
export class UpdateRoleDto {
|
||||
@ApiPropertyOptional({ description: 'Название роли' })
|
||||
@IsOptional()
|
||||
@IsString({ message: 'Название роли должно быть строкой' })
|
||||
name?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Описание роли' })
|
||||
@IsOptional()
|
||||
@IsString({ message: 'Описание должно быть строкой' })
|
||||
description?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Список slug прав', type: [String] })
|
||||
@IsOptional()
|
||||
@IsArray({ message: 'Права должны быть массивом' })
|
||||
@IsString({ each: true, message: 'Каждое право должно быть строкой' })
|
||||
permissionSlugs?: string[];
|
||||
}
|
||||
|
||||
export class CreateOAuthClientDto {
|
||||
@ApiProperty({ description: 'Название приложения', example: 'Lendry Docs' })
|
||||
@IsString({ message: 'Название должно быть строкой' })
|
||||
|
||||
Reference in New Issue
Block a user