diff --git a/ui-ngx/src/app/modules/home/models/widget-component.models.ts b/ui-ngx/src/app/modules/home/models/widget-component.models.ts index 30dea45d6b..1c371dc830 100644 --- a/ui-ngx/src/app/modules/home/models/widget-component.models.ts +++ b/ui-ngx/src/app/modules/home/models/widget-component.models.ts @@ -58,6 +58,8 @@ import { NotificationVerticalPosition } from '@core/notification/notification.models'; import { ActionNotificationShow } from '@core/notification/notification.actions'; +import { AuthUser } from '@shared/models/user.model'; +import { getCurrentAuthUser } from '@core/auth/auth.selectors'; export interface IWidgetAction { name: string; @@ -116,6 +118,14 @@ export class WidgetContext { this.changeDetectorValue = cd; } + get currentUser(): AuthUser { + if (this.store) { + return getCurrentAuthUser(this.store); + } else { + return null; + } + } + private changeDetectorValue: ChangeDetectorRef; inited = false;