From 63a4526f29ee8285339418fc580b8896784cc6ca Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Mon, 1 Jul 2019 08:56:35 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f6126a971..2d1c960db4 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Please join our community forum: https://support.squidex.io ## Status -Current Version v2.1.0. Roadmap: https://trello.com/b/KakM4F3S/squidex-roadmap +Current Version v2.2.0. Roadmap: https://trello.com/b/KakM4F3S/squidex-roadmap ## Prerequisites From 17ec289277606eb8305e48d169516c85e4e8c031 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Mon, 1 Jul 2019 15:58:15 +0200 Subject: [PATCH 2/2] Fix for password validator. --- .../pages/users/user-page.component.ts | 2 -- .../app/features/administration/state/users.forms.ts | 12 +++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Squidex/app/features/administration/pages/users/user-page.component.ts b/src/Squidex/app/features/administration/pages/users/user-page.component.ts index 0c7e1efc2c..cb5d2a3d6a 100644 --- a/src/Squidex/app/features/administration/pages/users/user-page.component.ts +++ b/src/Squidex/app/features/administration/pages/users/user-page.component.ts @@ -24,8 +24,6 @@ import { templateUrl: './user-page.component.html' }) export class UserPageComponent extends ResourceOwner implements OnInit { - public canUpdate = false; - public user?: { user: UserDto, isCurrentUser: boolean }; public userForm = new UserForm(this.formBuilder); diff --git a/src/Squidex/app/features/administration/state/users.forms.ts b/src/Squidex/app/features/administration/state/users.forms.ts index ca3effe386..95e360b901 100644 --- a/src/Squidex/app/features/administration/state/users.forms.ts +++ b/src/Squidex/app/features/administration/state/users.forms.ts @@ -24,7 +24,7 @@ export class UserForm extends Form { ], password: ['', [ - Validators.nullValidator + Validators.required ] ], passwordConfirm: ['', @@ -36,6 +36,16 @@ export class UserForm extends Form { })); } + public load(value: any) { + if (value) { + this.form.controls['password'].setValidators(Validators.nullValidator); + } else { + this.form.controls['password'].setValidators(Validators.required); + } + + super.load(value); + } + protected transformLoad(user: UpdateUserDto) { return { ...user, permissions: user.permissions.join('\n') }; }