Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 13, 2025

This is an automatic copy of pull request #13890 done by Mergify.


Issue

https://gravitee.atlassian.net/browse/APIM-10981

Description

The UserResource.getUserGroups endpoint now correctly filters groups by environment when the 'q' query parameter is provided with valid environmentId.
Sample:
management/organizations/{orgID}/users/{userID}/groups?q={envID} => filters data based on envID
management/organizations/{orgID}/users/{userID}/groups => provides full list of groups for the user

The issue was that old API is already deprecated GET management/organizations/{orgId}/environments/{envId}/users/{userId}/groups but if user wants to filter data based on the envId then there was no option to do so.

Changes:

  • Added GroupService.findByUserAndEnvironment method to filter groups by environment ID
  • Implemented environment-based filtering logic in GroupServiceImpl
  • Updated UserResource to call findByUserAndEnvironment with environment id when provided in query param.
  • Added comprehensive test coverage.

Previously, the endpoint returned all organization groups and no option was available for end user to filter data based on environment id.

Screen.Recording.2025-11-02.at.12.19.35.PM.mov

Updated fix with QUERY PARAM:

Screen.Recording.2025-11-11.at.9.59.02.PM.mov

Additional context


@mergify mergify bot requested a review from a team as a code owner November 13, 2025 13:11
@vikrantgravitee vikrantgravitee merged commit fa7e1e1 into 4.9.x Nov 13, 2025
12 checks passed
@vikrantgravitee vikrantgravitee deleted the mergify/bp/4.9.x/pr-13890 branch November 13, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants