summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src
diff options
context:
space:
mode:
authorMuni Mohan Kunchi <munmohan@att.com>2020-04-14 14:23:15 -0400
committerMuni Mohan Kunchi <munmohan@att.com>2020-04-14 14:24:12 -0400
commit21e503048d2d083e532064de6aab0fcb7ae0dea1 (patch)
tree2b244508f08f501ff72dc9303599c3e40613ca85 /ecomp-portal-BE-common/src
parent25b97739e0a702b18321fda93add927909152e5e (diff)
[PORTAL-876] pushing code for allowing non human users.
pushing code for allowing non human users. Issue-ID: PORTAL-876 Signed-off-by: Muni Mohan Kunchi <munmohan@att.com> Change-Id: I26411bc985caeec782f67dfa1683b055ca27bc35
Diffstat (limited to 'ecomp-portal-BE-common/src')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
index e5ce2068..4924e654 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
@@ -200,7 +200,12 @@ public class UserRolesCommonServiceImpl {
client = new EPUser();
client.setOrgUserId(userId);
client.setSystemUser(true);
- client.setFirstName(userId.substring(0,userId.indexOf("@")));
+ if (userId.indexOf("@") != -1) {
+ client.setFirstName(userId.substring(0,userId.indexOf("@")));
+ }
+ else {
+ client.setFirstName(userId);
+ }
}
if (client == null) {
String msg = "createLocalUserIfNecessary: cannot create user " + userId