Merge pull request #8745 from ArtemDzhereleiko/AD/bug-fix/mail-server-oauth2
Fixed oauth2 mail server settings
This commit is contained in:
commit
6b8cbbd3c9
@ -331,7 +331,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
<div fxLayout="row" fxLayoutAlign="end center" fxLayout.xs="column" fxLayoutAlign.xs="end" fxLayoutGap="16px">
|
<div fxLayout="row" fxLayoutAlign="end center" fxLayout.xs="column" fxLayoutAlign.xs="end" fxLayoutGap="16px">
|
||||||
<button mat-raised-button type="button"
|
<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()">
|
(click)="sendTestMail()">
|
||||||
{{'admin.send-test-mail' | translate}}
|
{{'admin.send-test-mail' | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -416,6 +416,9 @@ export class MailServerComponent extends PageComponent implements OnInit, OnDest
|
|||||||
private get mailSettingsFormValue(): MailServerSettings {
|
private get mailSettingsFormValue(): MailServerSettings {
|
||||||
const formValue = this.mailSettings.getRawValue() as Required<typeof this.mailSettings.value>;
|
const formValue = this.mailSettings.getRawValue() as Required<typeof this.mailSettings.value>;
|
||||||
delete formValue.changePassword;
|
delete formValue.changePassword;
|
||||||
|
if (!isDefinedAndNotNull(formValue.password)) {
|
||||||
|
delete formValue.password;
|
||||||
|
}
|
||||||
return formValue;
|
return formValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user