From 31aa1087ee42adbdc1bfdca16a00d4d5a121ccd1 Mon Sep 17 00:00:00 2001 From: Horilla Date: Fri, 14 Mar 2025 16:14:48 +0530 Subject: [PATCH] [ADD] GENERAL: Login restriction to archived django User instances --- horilla/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horilla/decorators.py b/horilla/decorators.py index c3b9970a2..d5c172fb0 100755 --- a/horilla/decorators.py +++ b/horilla/decorators.py @@ -223,7 +223,7 @@ def login_required(view_func): request.session["title"] = res if path == "" or path == "/": request.session["title"] = "Dashboard".upper() - if not request.user.is_authenticated: + if not request.user.is_authenticated or not request.user.is_active: login_url = reverse("login") params = urlencode(request.GET) url = f"{login_url}?next={request.path}"