SUPPORT-8956: add userId
This commit is contained in:
parent
6ef9028aa0
commit
587223ee78
5 changed files with 15 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue