Skip to content

Don't show "request access" button to project owners

What does this MR do?

This MR fixes an issue where project owners that are not in the project's members list (I believe this is how we handled project owners before, now we seem to create a "Master" member for the project creator) would see the Request Access button.

This MR fixes this issue in a clean way by adding a new :request_access ability to replace an ugly helper.

It also give project owners the ability to update & destroy a requester that would happen to be themselves (since owners could request access to their own project before this MR).

Are there points in the code the reviewer needs to double check?

Probably the change in ability.rb (but the tests didn't change, and I've even added two new ones so it should be good).

What are the relevant issue numbers?

Related to #18790 (closed).

Does this MR meet the acceptance criteria?

  • No CHANGELOG since this should go in a patch release
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Conform by the style guides
  • Branch has no merge conflicts with master (if you do - rebase it please)
  • Squashed related commits together

Merge request reports