mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the user management dialog should not allow the same email addresses
with different letter casings when creating users. #5262
This commit is contained in:
parent
0203bbc7ef
commit
ed1184fcf8
@ -25,4 +25,5 @@ Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #5249 <https://github.com/pgadmin-org/pgadmin4/issues/5249>`_ - Added the ability to display the selected text from the query tool in the find/replace box.
|
||||
| `Issue #5262 <https://github.com/pgadmin-org/pgadmin4/issues/5262>`_ - Ensure that the user management dialog should not allow the same email addresses with different letter casings when creating users.
|
||||
| `Issue #5308 <https://github.com/pgadmin-org/pgadmin4/issues/5308>`_ - Ensure that the default value for a column should be used if it is made empty.
|
||||
|
@ -145,7 +145,7 @@ class UserManagementCollection extends BaseUISchema {
|
||||
if (obj.isNew(state) && obj.top?._sessData?.userManagement) {
|
||||
for (let i=0; i < obj.top._sessData.userManagement.length; i++) {
|
||||
if (obj.top._sessData.userManagement[i]?.id &&
|
||||
obj.top._sessData.userManagement[i].username == state.username &&
|
||||
obj.top._sessData.userManagement[i].username.toLowerCase() == state.username.toLowerCase() &&
|
||||
obj.top._sessData.userManagement[i].auth_source == state.auth_source) {
|
||||
msg = gettext('User name \'%s\' already exists', state.username);
|
||||
setError('username', msg);
|
||||
@ -172,7 +172,7 @@ class UserManagementCollection extends BaseUISchema {
|
||||
if (obj.isNew(state) && obj.top?._sessData?.userManagement) {
|
||||
for (let i=0; i < obj.top._sessData.userManagement.length; i++) {
|
||||
if (obj.top._sessData.userManagement[i]?.id &&
|
||||
obj.top._sessData.userManagement[i].email == state.email) {
|
||||
obj.top._sessData.userManagement[i].email.toLowerCase() == state.email.toLowerCase()) {
|
||||
msg = gettext('Email address \'%s\' already exists', state.email);
|
||||
setError('email', msg);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user