mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1. Unverified email id is getting locked.
2. Admin should be able to lock the user, as currently it only unlocks it via user management dialog. 3. There were some indefinite login page loading issues when trying to log in with invalid password, where it should redirect to the login page again instead. refs #6337 (Initial patch by Khushboo Vashi)
This commit is contained in:
committed by
Akshay Joshi
parent
dc4f59e664
commit
ab04b30726
@@ -129,9 +129,12 @@ def validate_user(data):
|
||||
if 'auth_source' in data and data['auth_source'] != "":
|
||||
new_data['auth_source'] = data['auth_source']
|
||||
|
||||
if 'locked' in data and not data['locked']:
|
||||
if 'locked' in data and type(data['locked']) == bool:
|
||||
new_data['locked'] = data['locked']
|
||||
new_data['login_attempts'] = 0
|
||||
if data['locked']:
|
||||
new_data['login_attempts'] = config.MAX_LOGIN_ATTEMPTS
|
||||
else:
|
||||
new_data['login_attempts'] = 0
|
||||
|
||||
return new_data
|
||||
|
||||
|
||||
@@ -444,9 +444,6 @@ define([
|
||||
disabled: false,
|
||||
sortable: false,
|
||||
editable: function (m){
|
||||
if (!m.get('locked')) {
|
||||
return false;
|
||||
}
|
||||
return (m.get('id') != userInfo['id']);
|
||||
},
|
||||
}],
|
||||
|
||||
Reference in New Issue
Block a user