Skip to content

Improve protected environment users list pagination and filtering

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Currently, when viewing a group's protected environment, only 20 users are displayed even when the group has more members. This is due to the default pagination limit in the getProjectMembers API call.

Current behavior

Only 20 users are displayed in the protected environment users list The frontend receives a limited set of users from the API We filter users based on access level on the frontend No indication to users that the list is truncated

image

Proposal

We should improve this by:

  1. Moving the access level filtering to the backend API
  2. Implementing proper pagination in the UI with "Show more" or pagination controls
  3. Showing the total count of users who have access
  4. Adding a note that indicates the list is paginated when there are more than 20 users

Technical details

The issue is in the getProjectMembers API call in app/assets/javascripts/api/projects_api.js. Currently, we fetch a limited set of users and then filter by permission on the frontend, which can lead to inconsistent pagination behavior.

User impact

This affects customers with large groups who need to manage protected environment access for many users. They currently have no way to see the complete list of users who have access to a protected environment.

Related ticket: https://gitlab.zendesk.com/agent/tickets/607418 (internal)

Edited by 🤖 GitLab Bot 🤖