Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-07-05 20:24:46 +0300
committerRobert Speicher <robert@gitlab.com>2016-07-05 20:24:46 +0300
commit8a62c12d38c0e0438f0db0d661cb5275b39bc6b1 (patch)
tree8d366400ef774bc9bbf8bf6f3fce4dcd21147b1c /app/views
parentaefb8a1741b58a10832e63c73210b8608c2be753 (diff)
parent19b80e82521384284227b31003889c9ac41b7c8c (diff)
Merge branch '18790-dont-show-request-button-to-project-owner' into 'master'
Don't show "request access" button to project owners 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). Related to #18790. See merge request !5091
Diffstat (limited to 'app/views')
-rw-r--r--app/views/shared/members/_access_request_buttons.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/members/_access_request_buttons.html.haml b/app/views/shared/members/_access_request_buttons.html.haml
index 35dcdccc921..eff914398bb 100644
--- a/app/views/shared/members/_access_request_buttons.html.haml
+++ b/app/views/shared/members/_access_request_buttons.html.haml
@@ -1,4 +1,4 @@
-- if can_see_request_access_button?(source)
+- if can?(current_user, :request_access, source)
- if requester = source.requesters.find_by(user_id: current_user.id)
= link_to 'Withdraw Access Request', polymorphic_path([:leave, source, :members]),
method: :delete,