diff --git a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts index dd755a8b9..5bb6ca3e5 100644 --- a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts +++ b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts @@ -52,13 +52,12 @@ export class CreateOrUpdateAccessDialog implements OnDestroy { if (accessType === 'PRIVATE') { granteeUserIdControl.setValidators(Validators.required); - permissionsControl.setValidators(Validators.required); } else { granteeUserIdControl.clearValidators(); + permissionsControl.setValue(this.data.access.permissions[0]); } granteeUserIdControl.updateValueAndValidity(); - permissionsControl.updateValueAndValidity(); this.changeDetectorRef.markForCheck(); }); diff --git a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html index 951079717..b903c64d5 100644 --- a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html +++ b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html @@ -27,18 +27,18 @@ - @if (accessForm.get('type').value === 'PRIVATE') { -