Skip to content

Commit 7d9e482

Browse files
Merge pull request #4450 from PasinduYeshan/fix/store-identity2
Pass userStoreManager for store identity claim config retrieval
2 parents d367d85 + b2e077e commit 7d9e482

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16844,7 +16844,7 @@ public List<User> getUserListWithID(Condition condition, String domain, String p
1684416844
getExpressionConditions(duplicateCondition, expressionConditions);
1684516845

1684616846
// Check whether the request has IdentityClaims in filters.
16847-
mapAttributesToLocalIdentityClaims(expressionConditions, domain);
16847+
mapAttributesToLocalIdentityClaims(expressionConditions, domain, secondaryUserStoreManager);
1684816848
boolean identityClaimsExistsInInitialCondition = containsIdentityClaims(expressionConditions);
1684916849

1685016850
if (identityClaimsExistsInInitialCondition) {
@@ -17002,7 +17002,7 @@ public PaginatedUserResponse getPaginatedUserListWithID(Condition condition, Str
1700217002
validation in the next iteration of flow when the domain name is not in query params.*/
1700317003
Condition duplicateCondition = getDuplicateCondition(condition);
1700417004
getExpressionConditions(duplicateCondition, expressionConditions);
17005-
mapAttributesToLocalIdentityClaims(expressionConditions, domain);
17005+
mapAttributesToLocalIdentityClaims(expressionConditions, domain, secondaryUserStoreManager);
1700617006

1700717007
/* *****************************************************
1700817008
* Logic to Filter Users Based on Identity & Non Identity Claims
@@ -17122,7 +17122,7 @@ public int getUsersCount(Condition condition, String domain, String profileName,
1712217122
getExpressionConditions(duplicateCondition, expressionConditions);
1712317123

1712417124
// Check whether the request has IdentityClaims in filters.
17125-
mapAttributesToLocalIdentityClaims(expressionConditions, domain);
17125+
mapAttributesToLocalIdentityClaims(expressionConditions, domain, secondaryUserStoreManager);
1712617126
boolean identityClaimsExistsInInitialCondition = countIdentityClaims(expressionConditions) > 0;
1712717127

1712817128
if (identityClaimsExistsInInitialCondition) {
@@ -17410,7 +17410,8 @@ private boolean isConditionExist(ExpressionCondition expressionCondition) {
1741017410
* @throws UserStoreException
1741117411
*/
1741217412
private void mapAttributesToLocalIdentityClaims(List<ExpressionCondition> expressionConditions,
17413-
String userStoreDomain) throws UserStoreException {
17413+
String userStoreDomain, UserStoreManager userStoreManager)
17414+
throws UserStoreException {
1741417415

1741517416
List<org.wso2.carbon.user.api.ClaimMapping> claimMapping;
1741617417
try {
@@ -17433,7 +17434,7 @@ private void mapAttributesToLocalIdentityClaims(List<ExpressionCondition> expres
1743317434
}
1743417435

1743517436
// Check if the claim is an identity store managed claim and map the attribute name to claim URI.
17436-
if (isIdentityStoreManagedClaim(mappedClaim.getClaim(), userStoreDomain, null)) {
17437+
if (isIdentityStoreManagedClaim(mappedClaim.getClaim(), userStoreDomain, userStoreManager)) {
1743717438
expressionCondition.setAttributeName(mappedClaim.getClaim().getClaimUri());
1743817439
if (log.isDebugEnabled()) {
1743917440
log.debug("Obtained the ClaimURI " + mappedClaim.getClaim().getClaimUri() +

0 commit comments

Comments
 (0)