Commit a40c9d20 authored by Guilhem Saurel's avatar Guilhem Saurel

redirect to login page

parent 90f2f220
Pipeline #8426 passed with stage
in 1 minute and 21 seconds
from ipaddress import ip_address, ip_network
from django.conf import settings
from django.http import HttpRequest, HttpResponse, HttpResponseForbidden
from django.http import HttpRequest, HttpResponse, HttpResponseRedirect
from django.shortcuts import reverse
from rest_framework import permissions
......@@ -27,4 +28,4 @@ class LAASPermsMiddleware:
if allowed:
return self.get_response(request)
return HttpResponseForbidden()
return HttpResponseRedirect(reverse('login'))
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