From 252982d0387b8adfa07e4b3fec762c0372b97035 Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 20 Oct 2021 22:57:53 +0200 Subject: [PATCH] require active account to own domain --- backend/multimail/owner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/multimail/owner.py b/backend/multimail/owner.py index 110f971..19eebcf 100644 --- a/backend/multimail/owner.py +++ b/backend/multimail/owner.py @@ -12,5 +12,7 @@ def user_from_request(request): def may_own_domain(user): + if not user.is_authenticated or not user.is_active: + return False u = classify_user(user) return u["source"] == "system" or u["source"] == "ldap"