Browse Source

Merge pull request #8745 from ArtemDzhereleiko/AD/bug-fix/mail-server-oauth2

Fixed oauth2 mail server settings
pull/8798/head
Andrew Shvayka 3 years ago
committed by GitHub
parent
commit
6b8cbbd3c9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html
  2. 3
      ui-ngx/src/app/modules/home/pages/admin/mail-server.component.ts

2
ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html

@ -331,7 +331,7 @@
</fieldset>
<div fxLayout="row" fxLayoutAlign="end center" fxLayout.xs="column" fxLayoutAlign.xs="end" fxLayoutGap="16px">
<button mat-raised-button type="button"
[disabled]="(isLoading$ | async) || mailSettings.invalid || domainForm.invalid || (mailSettings.dirty || domainForm.dirty)"
[disabled]="(isLoading$ | async) || mailSettings.get('enableOauth2').value ? mailSettings.invalid || domainForm.invalid || (mailSettings.dirty || domainForm.dirty) : mailSettings.invalid"
(click)="sendTestMail()">
{{'admin.send-test-mail' | translate}}
</button>

3
ui-ngx/src/app/modules/home/pages/admin/mail-server.component.ts

@ -416,6 +416,9 @@ export class MailServerComponent extends PageComponent implements OnInit, OnDest
private get mailSettingsFormValue(): MailServerSettings {
const formValue = this.mailSettings.getRawValue() as Required<typeof this.mailSettings.value>;
delete formValue.changePassword;
if (!isDefinedAndNotNull(formValue.password)) {
delete formValue.password;
}
return formValue;
}

Loading…
Cancel
Save