Remove project stars when reducing visibility or removing members
Background
In #33358 (closed) we implemented “Remove fork relationship when the visibility of the parent is restricted”. At the same time, and similar to GitHub's modal, we started discussing in #33358 (comment 248116260) the possibility of also removing a project's stars when its visibility is restricted OR when project members are removed.
Argument
Stars are only relevant for authenticated users, so the case here is when a project becomes private, as internal project can still be accessed and starred by anyone who is authenticated.
When a project becomes private, non-project members can no longer access it. If a non-project member has starred that project, that “star” is no longer applicable as they can't see the project anymore in their “Starred projects” page.
Solution
The ideal solution would be to remove stars according to the membership and visibility of the project. Examples:
- Given a public (or internal) project with X stars by non-project members. When that project becomes private, those X stars are removed.
- Given a private project with Y stars by project members. When one of those 5 project members leaves/is removed from the project, their star is removed.
When reducing the project's visibility, show something like the following text in the modal: