From a695410be350171f113f2e7ba61b0a126b0bf1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 19 Mar 2014 14:40:13 +0100 Subject: [PATCH] do not automatically remove admin accounts (#4248) --- wcs/qommon/ident/password.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcs/qommon/ident/password.py b/wcs/qommon/ident/password.py index 781a19e..bc04063 100644 --- a/wcs/qommon/ident/password.py +++ b/wcs/qommon/ident/password.py @@ -1652,6 +1652,10 @@ def handle_unused_accounts(publisher): if not (warn_about_unused_account_delay or remove_unused_account_delay): return for user in get_publisher().user_class.select(): + if getattr(user, 'is_admin'): + # do not apply the automatic removal of unused accounts for + # administrators + continue if not getattr(user, 'last_seen', None): continue if (time.time() - user.last_seen) > 86400*warn_about_unused_account_delay: -- 1.9.1