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:
Rahul Shirsat
2021-08-09 20:55:06 +05:30
committed by Akshay Joshi
parent dc4f59e664
commit ab04b30726
10 changed files with 63 additions and 6 deletions

View File

@@ -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

View File

@@ -444,9 +444,6 @@ define([
disabled: false,
sortable: false,
editable: function (m){
if (!m.get('locked')) {
return false;
}
return (m.get('id') != userInfo['id']);
},
}],