Add business team access controls and customer role filters.
Super-admins can assign Admin; owners/admins manage Editor/Viewer via team/access, and the customers list supports all/customers/managers filtering. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
2c4d02bd0e
commit
e59db25814
@@ -0,0 +1,17 @@
|
||||
import { IsIn, IsOptional, IsString, Matches, ValidateIf } from 'class-validator';
|
||||
import { ASSIGNABLE_TEAM_ROLES } from '../../auth/auth.types';
|
||||
|
||||
export class AssignTeamAccessDto {
|
||||
@IsString()
|
||||
@Matches(/^\d+$/)
|
||||
userId!: string;
|
||||
|
||||
@IsString()
|
||||
@IsIn(['customer', 'staff'])
|
||||
access!: 'customer' | 'staff';
|
||||
|
||||
@ValidateIf((dto: AssignTeamAccessDto) => dto.access === 'staff')
|
||||
@IsString()
|
||||
@IsIn([...ASSIGNABLE_TEAM_ROLES])
|
||||
roleSlug?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user