From a581ab0f1a0883236802ea8add585383ef80ace4 Mon Sep 17 00:00:00 2001 From: Tatjana Dehler Date: Fri, 17 Jan 2020 15:54:05 +0100 Subject: [PATCH] mgr/dashboard: fix visibility of pwdExpirationDate field Show the 'pwdExpirationDate' form field only if SSO is not enabled. Also show a helper message if 'pwdExpirationSpan' is '0' to let the admin know that the password will only expire once. Fixes: https://tracker.ceph.com/issues/43523 Signed-off-by: Tatjana Dehler --- .../auth/user-form/user-form.component.html | 17 +++++++++++++++-- .../core/auth/user-form/user-form.component.ts | 8 -------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html index fd942c386c154..e8e0eeb32d96e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html @@ -103,13 +103,26 @@ i18n>Password confirmation doesn't match the password. -
+ *ngIf="!authStorageService.isSSO()"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts index e954591c4a6e6..ba3593e48b3b8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts @@ -227,14 +227,6 @@ export class UserFormComponent implements OnInit { } } - showExpirationDateField() { - return ( - this.userForm.getValue('pwdExpirationDate') > 0 || - this.userForm.touched || - this.pwdExpirationSettings.pwdExpirationSpan > 0 - ); - } - public isCurrentUser(): boolean { return this.authStorageService.getUsername() === this.userForm.getValue('username'); } -- 2.39.5