Skip to content

Commit

Permalink
Add realm configuration to get primary user store domain name.
Browse files Browse the repository at this point in the history
  • Loading branch information
DInuwan97 authored and rksk committed Dec 7, 2022
1 parent 2e6a5a0 commit f9383a5
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2044,10 +2044,17 @@ private Set<org.wso2.carbon.user.core.common.User> getMultiAttributeFilteredUser
private int getMaxLimit(String domainName) {

int givenMax = UserCoreConstants.MAX_USER_ROLE_LIST;

if (StringUtils.isEmpty(domainName)) {
domainName = UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME;
domainName = carbonUM.getRealmConfiguration().getUserStoreProperty(UserCoreConstants.RealmConfig.
PROPERTY_DOMAIN_NAME);
if (StringUtils.isEmpty(domainName)) {
domainName = UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME;
}
if (log.isDebugEnabled()) {
log.debug("Primary user store DomainName picked as " + domainName);
}
}

if (carbonUM.getSecondaryUserStoreManager(domainName).getRealmConfiguration()
.getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_MAX_USER_LIST) != null) {
givenMax = Integer.parseInt(carbonUM.getSecondaryUserStoreManager(domainName).getRealmConfiguration()
Expand Down

0 comments on commit f9383a5

Please sign in to comment.