From bca450dbe1012f5c61b94815547fbb348ff2e4ac Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Fri, 26 Mar 2021 18:09:55 +0200 Subject: [PATCH] UI: Fixed error access is forbidden in the system admin change profile --- .../modules/home/pages/profile/profile.component.html | 4 ++-- .../app/modules/home/pages/profile/profile.component.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/profile/profile.component.html b/ui-ngx/src/app/modules/home/pages/profile/profile.component.html index eaca7133a0..f1a42344fb 100644 --- a/ui-ngx/src/app/modules/home/pages/profile/profile.component.html +++ b/ui-ngx/src/app/modules/home/pages/profile/profile.component.html @@ -57,13 +57,13 @@ language.language - + {{ lang ? ('language.locales.' + lang | translate) : ''}} -
+
, private route: ActivatedRoute, @@ -55,6 +57,7 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir public dialogService: DialogService, public fb: FormBuilder) { super(store); + this.authUser = getCurrentAuthUser(this.store); } ngOnInit() { @@ -134,4 +137,8 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir return this.profile; } + isSysAdmin(): boolean { + return this.authUser.authority === Authority.SYS_ADMIN; + } + }