Allow adm to change any password (hopefully)

darcs-hash:20091119014343-61eff-f6d44d66e95b840681bee0e671366061ad658569.gz
This commit is contained in:
Stephane Glondu 2009-11-19 02:43:43 +01:00
parent ef1b93cc42
commit 1b03d6517b

View file

@ -19,7 +19,7 @@ Licence : GPLv2
"""
import getpass, commands, os, sys, base64, syslog
from user_tests import getuser
from user_tests import getuser, isadm
from affich_tools import cprint
try :
@ -193,7 +193,7 @@ if __name__ == '__main__' :
cprint({ 'Invalid credentials (49)': u'Mot de passe invalide' }.get(resultat, resultat), 'rouge')
sys.exit(8)
elif len(s) > 3 and os.getuid()!=0 :
elif len(s) > 3 and os.getuid()!=0 and not isadm():
# Adhérent avec droits et on est pas root
From = 'roots@crans.org'
To = 'roots@crans.org'