From 903ba5a9a778c87de6280332dfee0eea71eaf2f5 Mon Sep 17 00:00:00 2001 From: Puja Sharma Date: Wed, 13 Apr 2022 17:56:52 +0530 Subject: [PATCH] feat(jans-config-api): user management enhancement to chk mandatory feilds --- .../src/main/java/io/jans/configapi/util/ApiConstants.java | 3 --- .../main/java/io/jans/configapi/service/auth/UserService.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/util/ApiConstants.java b/jans-config-api/common/src/main/java/io/jans/configapi/util/ApiConstants.java index 4e41c629aa5..4750279214e 100644 --- a/jans-config-api/common/src/main/java/io/jans/configapi/util/ApiConstants.java +++ b/jans-config-api/common/src/main/java/io/jans/configapi/util/ApiConstants.java @@ -112,8 +112,5 @@ private ApiConstants() {} public static final int DEFAULT_MAX_COUNT = 200; public static final String SORT_BY = "sortBy"; public static final String SORT_ORDER = "sortOrder"; - - //commaSeparatedString of attributes to be excluded in User fetch request - //public static final String USER_EXCLUDED_ATTRIBUTES = "userPassword,"; } \ No newline at end of file diff --git a/jans-config-api/server/src/main/java/io/jans/configapi/service/auth/UserService.java b/jans-config-api/server/src/main/java/io/jans/configapi/service/auth/UserService.java index 79b3a05a1c9..a5cead7920f 100644 --- a/jans-config-api/server/src/main/java/io/jans/configapi/service/auth/UserService.java +++ b/jans-config-api/server/src/main/java/io/jans/configapi/service/auth/UserService.java @@ -260,7 +260,7 @@ public String checkMandatoryFields(User user) } } logger.debug("Checking mandatory missingAttributes:{} ", missingAttributes); - if (missingAttributes != null && missingAttributes.length() > 0) { + if (missingAttributes.length() > 0) { missingAttributes.replace(missingAttributes.lastIndexOf(","), missingAttributes.length(), ""); }