projects/isy-angular-widgets/src/lib/api/userinfo.ts
Contains information about a user, mostly used for the currently logged-in user.
Properties |
|
| displayName |
displayName:
|
Type : string
|
| Optional |
|
The name of the user to be shown in GUI. |
| roles |
roles:
|
Type : string[]
|
| Optional |
|
The roles associated with the user. |
| userId |
userId:
|
Type : string
|
| Optional |
|
The technical user ID. |
import {Injectable} from '@angular/core';
/**
* Contains information about a user, mostly used for the currently logged-in user.
*/
export interface UserInfo {
/**
* The technical user ID.
*/
userId?: string;
/**
* The roles associated with the user.
*/
roles?: string[];
/**
* The name of the user to be shown in GUI.
*/
displayName?: string;
}
/**
* An abstract service to provide a concrete implementation for {@link UserInfo} gathering.
*/
@Injectable()
export abstract class UserInfoService {
/**
* Returns the user info object.
* Necessary server calls should be implemented here.
*/
abstract getUserInfo(): UserInfo;
}