-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get totalResults
Value by Total User Count in SCIM2 User API
#547
Get totalResults
Value by Total User Count in SCIM2 User API
#547
Conversation
…TotalResultsByUserCount config is enabled, retrieve users only for groups in scim2 user endpoint group filter.
...y.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMUserManager.java
Outdated
Show resolved
Hide resolved
@dhaura could you please list out all the flows you covered while testing. Also, if you haven't done already, test this with count query param added in the request.
|
@mpmadhavig I tested this fix with the SCIM2 user endpoint groups filter using API call [1] for following scenarios.
[1] -
|
PR builder started |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/8626469299
// Get the total user count by the filter query. | ||
// This is only implemented for JDBC userstores. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a single line comment? Or else format as a multi line comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed with #553
@@ -1457,6 +1464,30 @@ private UsersGetResponse filterUsersBySingleAttribute(ExpressionNode node, Map<S | |||
return getDetailedUsers(filteredUsers, totalResults); | |||
} | |||
|
|||
/** | |||
* method to get user count by filtering parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion : Get user count by filtering parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed with #553
@@ -1694,6 +1730,54 @@ private Set<org.wso2.carbon.user.core.common.User> filterUsers(Node node, int of | |||
} | |||
} | |||
|
|||
/** | |||
* Method to get User Count by Group filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion : Get user count by group filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed with #553
String attributeValue = ((ExpressionNode) node).getValue(); | ||
|
||
/* | ||
If there is a domain and if the domain separator is not found in the attribute value, append the domain | ||
with the domain separator in front of the new attribute value. | ||
*/ | ||
attributeValue = UserCoreUtil.addDomainToName(((ExpressionNode) node).getValue(), domainName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the extra assignment in 1749?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed with #553
Purpose
Related Issues
Related PRs
getUserCountByRole()
Method wso2/carbon-kernel#3951