UNPKG

@netgrif/components-core

Version:

Netgrif Application engine frontend core Angular library

41 lines (40 loc) 1.28 kB
import { ProcessRole } from '../../resources/interface/process-role'; import { IUser } from './iuser'; /** * The user object that is used by the frontend in its logic. */ export declare class User implements IUser { id: string; username: string; email: string; realmId: string; firstName: string; lastName: string; authorities: Array<string>; roles: Array<ProcessRole>; groups?: Array<string>; nextGroups?: Array<string>; impersonated?: User; constructor(id: string, username: string, email: string, realmId: string, firstName: string, lastName: string, authorities: Array<string>, roles: Array<ProcessRole>, groups?: Array<string>, nextGroups?: Array<string>, impersonated?: User); get fullName(): string; /** * Synonym for `firstName`. */ get name(): string; /** * Synonym for `lastName`. */ get surname(): string; /** * @returns `true` if the User object represents an empty user, `false` otherwise. */ isEmpty(): boolean; /** * @returns self if no impersonated user is present, or impersonated user otherwise */ getSelfOrImpersonated(): User; /** * @returns true if user is impersonating another user */ isImpersonating(): boolean; }