Fix Bug 2396 : Inconsistent behavior in user creation between the UI and CLI
- Made the UI case insensitive for username as followed in cli
Change-Id: I924b01af650963e29a56de263a343fe2b7b75e20
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/users/add-user/AddEditUserComponent.ts b/src/app/users/add-user/AddEditUserComponent.ts
index 5226d5b..5746634 100644
--- a/src/app/users/add-user/AddEditUserComponent.ts
+++ b/src/app/users/add-user/AddEditUserComponent.ts
@@ -259,13 +259,13 @@
this.isLoadingResults = true;
if (isNullOrUndefined(this.userForm.value.otp)) {
this.payload = JSON.stringify({
- username: (this.userForm.value.userName).toLowerCase(),
+ username: (this.userForm.value.userName),
email_id: (this.userForm.value.email_id)
});
} else {
this.getFormControl('userName').enable();
this.payload = JSON.stringify({
- username: (this.userForm.value.userName).toLowerCase(),
+ username: (this.userForm.value.userName),
otp: (this.userForm.value.otp)
});
}
@@ -353,14 +353,14 @@
this.isLoadingResults = true;
if (!isNullOrUndefined(this.userForm.value.email_id) && this.userForm.value.email_id !== '') {
this.addPayload = JSON.stringify({
- username: (this.userForm.value.userName).toLowerCase(),
+ username: (this.userForm.value.userName),
password: (this.userForm.value.password),
email_id: (this.userForm.value.email_id),
domain_name: !isNullOrUndefined(this.userForm.value.domain_name) ? this.userForm.value.domain_name : undefined
});
} else {
this.addPayload = JSON.stringify({
- username: (this.userForm.value.userName).toLowerCase(),
+ username: (this.userForm.value.userName),
password: (this.userForm.value.password),
domain_name: !isNullOrUndefined(this.userForm.value.domain_name) ? this.userForm.value.domain_name : undefined
});
@@ -392,7 +392,7 @@
payLoad.email_id = (this.userForm.value.email_id);
}
else {
- payLoad.username = this.userForm.value.userName.toLowerCase();
+ payLoad.username = this.userForm.value.userName;
}
const apiURLHeader: APIURLHEADER = {
url: environment.USERS_URL + '/' + this.userID,