Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Squidex/app/features/administration/pages/users/user-page.component.ts
  • Loading branch information
SebastianStehle committed Jul 1, 2019
2 parents 37eddb8 + fa31a94 commit b603049
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 11 additions & 1 deletion src/Squidex/app/features/administration/state/users.forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class UserForm extends Form<FormGroup, UpdateUserDto> {
],
password: ['',
[
Validators.nullValidator
Validators.required
]
],
passwordConfirm: ['',
Expand All @@ -36,6 +36,16 @@ export class UserForm extends Form<FormGroup, UpdateUserDto> {
}));
}

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') };
}
Expand Down

0 comments on commit b603049

Please sign in to comment.