From: SANDHYA.JS Date: Thu, 12 Dec 2024 14:55:31 +0000 (+0530) Subject: Fix Bug 2396 : Inconsistent behavior in user creation between the UI and CLI X-Git-Tag: v17.0.0~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=eb7e389795d7a4d7e2c48abc77b185fc820e5283;p=osm%2FNG-UI.git 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 --- 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 @@ 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,