Show non-visible review groups and repositories in related object widgets.

Review Request #13122 — Created June 22, 2023 and submitted

Information

Review Board
release-5.0.x

Reviewers

When configuring a repository or a default reviewer, the selectors for
review groups and repositories would only show visible items. This meant
that if a company was making groups invisible to keep others from seeing
them, but not to phase them out, then they wouldn't have the ability to
specify them when configuring repositories or default reviewers.

This worked back in Review Board 3, but regressed in 4 with the addition
of the related object selectors. The reason this happened is that we
moved from fetching all possible items at page render time to querying
via the API, and the review groups API lacked any way to query
non-visible review groups.

Now that the API is gaining this support, we can redo these widgets.
They now take options for showing non-visible items, and will funnel the
correct state down to the JavaScript for inclusion in the API call.

This is enabled by default, in order to ensure users who make heavy use
of hidden review groups/repositories for access control reasons will be
able to configure these. Users interacting with the selector will only
be able to select review groups/repositories they have access to, so
this will be safe.

Unit tests pass.

Successfully added hidden review groups and repositories in the Default
Reviewers page, and added hidden review groups in the Repository page.

Summary ID
Show non-visible review groups and repositories in related object widgets.
When configuring a repository or a default reviewer, the selectors for review groups and repositories would only show visible items. This meant that if a company was making groups invisible to keep others from seeing them, but not to phase them out, then they wouldn't have the ability to specify them when configuring repositories or default reviewers. This worked back in Review Board 3, but regressed in 4 with the addition of the related object selectors. The reason this happened is that we moved from fetching all possible items at page render time to querying via the API, and the review groups API lacked any way to query non-visible review groups. Now that the API is gaining this support, we can redo these widgets. They now take options for showing non-visible items, and will funnel the correct state down to the JavaScript for inclusion in the API call. This is enabled by default, in order to ensure users who make heavy use of hidden review groups/repositories for access control reasons will be able to configure these. Users interacting with the selector will only be able to select review groups/repositories they have access to, so this will be safe.
df317066957dd67b1bbe944463664e4529b0e7a1
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.0.x (c167a01)