feat(auth,roles): implement dynamic permission payload, role deletion guard,...
Summary of Changes - Backend
1. Dynamic Roles & Permissions in Auth Payload
DTO Updates (auth.dto.ts): Extended MeDto and LoginResponseDto["user"] to return roles: string[] and permissions: string[].
Auth Service (auth.service.ts): Injected PermissionService to dynamically resolve effective permission slugs and roles on login() and getMe(), eliminating reliance on static role flags.
Role Service (role.service.ts): Prevented deletion of roles when active user associations exist (existing._count.userRoles > 0) and blocked system role removal.
3. User Management APIs & Validation
User Service & Repository (user.service.ts, user.repository.ts, user.dto.ts, user.validation.ts): Implemented user pagination, search, status toggles (isActive), and initial role assignment support.
Check out, review, and merge locally
Step 1.
Fetch and check out the branch for this merge request