mirror of https://github.com/jumpserver/jumpserver
perf: 企业微信绑定后退出
parent
16e8c7faba
commit
e713bdab0b
|
@ -1,6 +1,7 @@
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib.auth import logout as auth_logout
|
||||||
from django.db.utils import IntegrityError
|
from django.db.utils import IntegrityError
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import HttpResponseRedirect
|
from django.http.response import HttpResponseRedirect
|
||||||
|
@ -158,6 +159,7 @@ class DingTalkQRBindCallbackView(DingTalkQRMixin, View):
|
||||||
ip = get_request_ip(request)
|
ip = get_request_ip(request)
|
||||||
OAuthBindMessage(user, ip, _('DingTalk'), user_id).publish_async()
|
OAuthBindMessage(user, ip, _('DingTalk'), user_id).publish_async()
|
||||||
msg = _('Binding DingTalk successfully')
|
msg = _('Binding DingTalk successfully')
|
||||||
|
auth_logout(request)
|
||||||
response = self.get_success_response(redirect_url, msg, msg)
|
response = self.get_success_response(redirect_url, msg, msg)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib.auth import logout as auth_logout
|
||||||
from django.db.utils import IntegrityError
|
from django.db.utils import IntegrityError
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import HttpResponseRedirect
|
from django.http.response import HttpResponseRedirect
|
||||||
|
@ -121,6 +122,7 @@ class FeiShuQRBindCallbackView(FeiShuQRMixin, View):
|
||||||
ip = get_request_ip(request)
|
ip = get_request_ip(request)
|
||||||
OAuthBindMessage(user, ip, _('FeiShu'), user_id).publish_async()
|
OAuthBindMessage(user, ip, _('FeiShu'), user_id).publish_async()
|
||||||
msg = _('Binding FeiShu successfully')
|
msg = _('Binding FeiShu successfully')
|
||||||
|
auth_logout(request)
|
||||||
response = self.get_success_response(redirect_url, msg, msg)
|
response = self.get_success_response(redirect_url, msg, msg)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib.auth import logout as auth_logout
|
||||||
from django.db.utils import IntegrityError
|
from django.db.utils import IntegrityError
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import HttpResponseRedirect
|
from django.http.response import HttpResponseRedirect
|
||||||
|
@ -158,6 +159,7 @@ class WeComQRBindCallbackView(WeComQRMixin, View):
|
||||||
ip = get_request_ip(request)
|
ip = get_request_ip(request)
|
||||||
OAuthBindMessage(user, ip, _('WeCom'), wecom_userid).publish_async()
|
OAuthBindMessage(user, ip, _('WeCom'), wecom_userid).publish_async()
|
||||||
msg = _('Binding WeCom successfully')
|
msg = _('Binding WeCom successfully')
|
||||||
|
auth_logout(request)
|
||||||
response = self.get_success_response(redirect_url, msg, msg)
|
response = self.get_success_response(redirect_url, msg, msg)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue