From: Tatjana Dehler Date: Fri, 17 Jan 2020 14:54:05 +0000 (+0100) Subject: mgr/dashboard: fix visibility of pwdExpirationDate field X-Git-Tag: v15.1.0~123^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a581ab0f1a0883236802ea8add585383ef80ace4;p=ceph.git 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 --- 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 fd942c386c1..e8e0eeb32d9 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 e954591c4a6..ba3593e48b3 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'); }