Impersination backend

This commit is contained in:
Bastian Wagner
2026-02-20 13:17:58 +01:00
parent affea90e91
commit 62520466dc
11 changed files with 118 additions and 37 deletions

View File

@@ -35,7 +35,7 @@ export class AuthGuard implements CanActivate {
if (payload.type != 'access') {
throw new UnauthorizedException('wrong token');
}
const user = await this.authService.getUserById(payload.id);
const user = await this.authService.getUserById(payload.id, true);
if (!user.isActive) {
throw new HttpException('not active', HttpStatus.FORBIDDEN);
}