From 654f59fb9d05c0a49a95e4eb9c2d4df88ec7feb3 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Thu, 29 Jun 2023 18:48:39 +0300 Subject: [PATCH] fix bug 63175 --- web/ASC.Web.Api/Api/SmtpSettingsController.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web/ASC.Web.Api/Api/SmtpSettingsController.cs b/web/ASC.Web.Api/Api/SmtpSettingsController.cs index 7a27dcae91..e0bff3113c 100644 --- a/web/ASC.Web.Api/Api/SmtpSettingsController.cs +++ b/web/ASC.Web.Api/Api/SmtpSettingsController.cs @@ -64,14 +64,21 @@ public class SmtpSettingsController : ControllerBase { CheckSmtpPermissions(); - var settings = _mapper.Map(_coreConfiguration.SmtpSettings); + var current = _coreConfiguration.SmtpSettings; + + if (current.IsDefaultSettings && !_coreBaseSettings.Standalone) + { + current = SmtpSettings.Empty; + } + + var settings = _mapper.Map(current); settings.CredentialsUserPassword = ""; return settings; } [HttpPost("smtp")] - public SmtpSettingsDto SaveSmtpSettings( SmtpSettingsDto inDto) + public SmtpSettingsDto SaveSmtpSettings(SmtpSettingsDto inDto) { CheckSmtpPermissions();