SUPPORT-8956: add userId

This commit is contained in:
adel.ka 2025-03-02 11:08:29 +03:00
parent 6ef9028aa0
commit 587223ee78
5 changed files with 15 additions and 3 deletions

View file

@ -3,6 +3,7 @@ import {Subject} from "rxjs";
import {HttpClient} from "@angular/common/http";
export interface UserSession {
userId: string,
name: string,
realm: string,
domainId: string,
@ -41,6 +42,10 @@ export class AuthorizationService {
return this.isAuthorized() && this.getRoles().includes(role);
}
getUserId(): string{
return this.isAuthorized() ? this.session.userId: null;
}
getName(): string {
return this.isAuthorized() ? this.session.name : null;
}