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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
1 deletions
-
ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html
-
ui-ngx/src/app/modules/home/pages/admin/mail-server.component.ts
|
|
|
@ -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> |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
|