Remove reserved_user when fetching users

api-performance
Navod Zoysa 2 years ago
parent 3616245ae6
commit 8d9e3c8f51

@ -455,7 +455,7 @@ public class UserManagementServiceImpl implements UserManagementService {
userList = new ArrayList<>(users.size()); userList = new ArrayList<>(users.size());
BasicUserInfo user; BasicUserInfo user;
for (String username : users) { for (String username : users) {
if (Constants.APIM_RESERVED_USER.equals(username)) { if (Constants.APIM_RESERVED_USER.equals(username) || Constants.RESERVED_USER.equals(username)) {
continue; continue;
} }
user = getBasicUserInfo(username); user = getBasicUserInfo(username);
@ -520,6 +520,7 @@ public class UserManagementServiceImpl implements UserManagementService {
} }
if (commonUsers != null) { if (commonUsers != null) {
commonUsers.remove(Constants.APIM_RESERVED_USER); commonUsers.remove(Constants.APIM_RESERVED_USER);
commonUsers.remove(Constants.RESERVED_USER);
} }
if (!skipSearch(commonUsers) && StringUtils.isNotEmpty(firstName)) { if (!skipSearch(commonUsers) && StringUtils.isNotEmpty(firstName)) {
@ -695,7 +696,7 @@ public class UserManagementServiceImpl implements UserManagementService {
userList = new ArrayList<>(); userList = new ArrayList<>();
UserInfo user; UserInfo user;
for (String username : users) { for (String username : users) {
if (Constants.APIM_RESERVED_USER.equals(username)) { if (Constants.APIM_RESERVED_USER.equals(username) || Constants.RESERVED_USER.equals(username)) {
continue; continue;
} }
user = new UserInfo(); user = new UserInfo();

@ -31,7 +31,8 @@ public class Constants {
public static final String USER_CLAIM_DEVICES = "http://wso2.org/claims/devices"; public static final String USER_CLAIM_DEVICES = "http://wso2.org/claims/devices";
public static final String PRIMARY_USER_STORE = "PRIMARY"; public static final String PRIMARY_USER_STORE = "PRIMARY";
public static final String APIM_RESERVED_USER = "apim_reserved_user"; public static final String APIM_RESERVED_USER = "apim_reserved_user";
public static final String DEFAULT_STREAM_VERSION = "1.0.0"; public static final String RESERVED_USER = "reserved_user";
public static final String DEFAULT_STREAM_VERSION = "1.0.0";
public static final String SCOPE = "scope"; public static final String SCOPE = "scope";
public static final String JDBC_USERSTOREMANAGER = "org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager"; public static final String JDBC_USERSTOREMANAGER = "org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager";
public static final String DEFAULT_SIMPLE_DATE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z"; public static final String DEFAULT_SIMPLE_DATE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";

Loading…
Cancel
Save