bfb04eac66
- Create UserController with GET/POST/PATCH/DELETE endpoints at /users - ADMIN sees own-tenant users only; SUPER_ADMIN sees all (T-02-10) - ADMIN cannot escalate to SUPER_ADMIN role (T-02-08) - ADMIN cannot delete self or cross-tenant users - Create TenantController with GET/POST/PATCH/DELETE at /tenants - SUPER_ADMIN-only access (D-10) - Tenant deletion blocked if active users exist (T-02-09) - Create CreateUserDto, UpdateUserDto, CreateTenantDto with class-validator - Create admin/users page with user table, create/edit/delete modals - Create admin/tenants page with tenant table, create/edit/deactivate (SUPER_ADMIN only) - Add admin section to sidebar: Verwaltung > Benutzer + Mandanten - Verwaltung visible for ADMIN/SUPER_ADMIN; Tenants link SUPER_ADMIN only - Install @nestjs/mapped-types for PartialType DTO pattern Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 lines
280 B
TypeScript
10 lines
280 B
TypeScript
import { PartialType } from '@nestjs/mapped-types';
|
|
import { IsBoolean, IsOptional } from 'class-validator';
|
|
import { CreateUserDto } from './create-user.dto';
|
|
|
|
export class UpdateUserDto extends PartialType(CreateUserDto) {
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
isActive?: boolean;
|
|
}
|