forked from DGNum/gestioCOF
can change own password
This commit is contained in:
parent
c58ac3a904
commit
1c5c1fe94d
1 changed files with 2 additions and 1 deletions
|
@ -402,7 +402,8 @@ def account_update(request, trigramme):
|
||||||
account_form.save(data = data)
|
account_form.save(data = data)
|
||||||
|
|
||||||
# Checking perm to update password
|
# Checking perm to update password
|
||||||
if (request.user.has_perm('kfet.change_account_password')
|
if ((request.user.has_perm('kfet.change_account_password')
|
||||||
|
or request.user = account.user)
|
||||||
and pwd_form.is_valid()):
|
and pwd_form.is_valid()):
|
||||||
pwd = pwd_form.cleaned_data['pwd1']
|
pwd = pwd_form.cleaned_data['pwd1']
|
||||||
pwd_sha256 = hashlib.sha256(pwd.encode('utf-8')).hexdigest()
|
pwd_sha256 = hashlib.sha256(pwd.encode('utf-8')).hexdigest()
|
||||||
|
|
Loading…
Reference in a new issue