Unverified Commit 8bead0a3 authored by BaiJiangJie's avatar BaiJiangJie Committed by GitHub

[Update] Merge master_bugfix to dev_bugfix (#2817)

* [Update] 邮件设置添加配置项:发送账号 (#2795)

* [Bugfix] 修复普通用户被授权的RemoteApp列表加载为空的bug

* [Bugfix] 修复普通用户加载被授权的RemoteApp为空的bug

* [Update] 修改邮件测试的接受者为发送者
parent 04655b90
This diff is collapsed.
# ~*~ coding: utf-8 ~*~ # ~*~ coding: utf-8 ~*~
# #
from orgs.utils import set_to_root_org from orgs.utils import set_to_root_org
__all__ = [ __all__ = [
...@@ -116,4 +115,3 @@ class ChangeOrgIfNeedMixin(object): ...@@ -116,4 +115,3 @@ class ChangeOrgIfNeedMixin(object):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
self.change_org_if_need(request, kwargs) self.change_org_if_need(request, kwargs)
return super().get(request, *args, **kwargs) return super().get(request, *args, **kwargs)
...@@ -39,7 +39,7 @@ class MailTestingAPI(APIView): ...@@ -39,7 +39,7 @@ class MailTestingAPI(APIView):
subject = "Test" subject = "Test"
message = "Test smtp setting" message = "Test smtp setting"
email_from = email_from or email_host_user email_from = email_from or email_host_user
send_mail(subject, message, email_from, [email_host_user]) send_mail(subject, message, email_from, [email_from])
except Exception as e: except Exception as e:
return Response({"error": str(e)}, status=401) return Response({"error": str(e)}, status=401)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment