Disabling ajax login by default
This commit is contained in:
parent
638363c6f9
commit
2515c3a15d
2 changed files with 5 additions and 3 deletions
|
@ -85,3 +85,5 @@ setting_default(
|
||||||
'alias': ['demo1', 'demo2']
|
'alias': ['demo1', 'demo2']
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
setting_default('CAS_ENABLE_AJAX_AUTH', False)
|
||||||
|
|
|
@ -109,7 +109,7 @@ class LogoutView(View, LogoutMixin):
|
||||||
self.request = request
|
self.request = request
|
||||||
self.service = request.GET.get('service')
|
self.service = request.GET.get('service')
|
||||||
self.url = request.GET.get('url')
|
self.url = request.GET.get('url')
|
||||||
self.ajax = 'HTTP_X_AJAX' in request.META
|
self.ajax = settings.CAS_ENABLE_AJAX_AUTH and 'HTTP_X_AJAX' in request.META
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
"""methode called on GET request on this view"""
|
"""methode called on GET request on this view"""
|
||||||
|
@ -203,7 +203,7 @@ class LoginView(View, LogoutMixin):
|
||||||
self.renew = bool(request.POST.get('renew') and request.POST['renew'] != "False")
|
self.renew = bool(request.POST.get('renew') and request.POST['renew'] != "False")
|
||||||
self.gateway = request.POST.get('gateway')
|
self.gateway = request.POST.get('gateway')
|
||||||
self.method = request.POST.get('method')
|
self.method = request.POST.get('method')
|
||||||
self.ajax = 'HTTP_X_AJAX' in request.META
|
self.ajax = settings.CAS_ENABLE_AJAX_AUTH and 'HTTP_X_AJAX' in request.META
|
||||||
if request.POST.get('warned') and request.POST['warned'] != "False":
|
if request.POST.get('warned') and request.POST['warned'] != "False":
|
||||||
self.warned = True
|
self.warned = True
|
||||||
self.warn = request.POST.get('warn')
|
self.warn = request.POST.get('warn')
|
||||||
|
@ -298,7 +298,7 @@ class LoginView(View, LogoutMixin):
|
||||||
self.renew = bool(request.GET.get('renew') and request.GET['renew'] != "False")
|
self.renew = bool(request.GET.get('renew') and request.GET['renew'] != "False")
|
||||||
self.gateway = request.GET.get('gateway')
|
self.gateway = request.GET.get('gateway')
|
||||||
self.method = request.GET.get('method')
|
self.method = request.GET.get('method')
|
||||||
self.ajax = 'HTTP_X_AJAX' in request.META
|
self.ajax = settings.CAS_ENABLE_AJAX_AUTH and 'HTTP_X_AJAX' in request.META
|
||||||
self.warn = request.GET.get('warn')
|
self.warn = request.GET.get('warn')
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue