Projet

Général

Profil

0001-do-not-automatically-remove-admin-accounts-4248.patch

Frédéric Péters, 19 mars 2014 14:42

Télécharger (1,02 ko)

Voir les différences:

Subject: [PATCH] do not automatically remove admin accounts (#4248)

 wcs/qommon/ident/password.py | 4 ++++
 1 file changed, 4 insertions(+)
wcs/qommon/ident/password.py
1652 1652
    if not (warn_about_unused_account_delay or remove_unused_account_delay):
1653 1653
        return
1654 1654
    for user in get_publisher().user_class.select():
1655
        if getattr(user, 'is_admin'):
1656
            # do not apply the automatic removal of unused accounts for
1657
            # administrators
1658
            continue
1655 1659
        if not getattr(user, 'last_seen', None):
1656 1660
            continue
1657 1661
        if (time.time() - user.last_seen) > 86400*warn_about_unused_account_delay:
1658
-