Fix Bug 2396 : Inconsistent behavior in user creation between the UI and CLI 39/14839/1
authorSANDHYA.JS <sandhya.j@tataelxsi.co.in>
Thu, 12 Dec 2024 14:55:31 +0000 (20:25 +0530)
committerSANDHYA.JS <sandhya.j@tataelxsi.co.in>
Thu, 12 Dec 2024 14:55:31 +0000 (20:25 +0530)
        - Made the UI case insensitive for username as followed in cli

Change-Id: I924b01af650963e29a56de263a343fe2b7b75e20
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
src/app/users/add-user/AddEditUserComponent.ts

index 5226d5b..5746634 100644 (file)
@@ -259,13 +259,13 @@ export class AddEditUserComponent implements OnInit {
         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 @@ export class AddEditUserComponent implements OnInit {
         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 @@ export class AddEditUserComponent implements OnInit {
             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,