summaryrefslogtreecommitdiff
path: root/app/helpers/members_helper.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-05 14:24:58 +0200
committerRémy Coutable <remy@rymai.me>2016-07-05 14:35:26 +0200
commit22ba5d8a7f0920f39ba33bdc4af54531ffe40b1e (patch)
tree2178ba63c281c892c693f214871b32ab2214a50a /app/helpers/members_helper.rb
parentaad62735a4643f851047c11eca9eb188d0ef8c77 (diff)
downloadgitlab-ce-22ba5d8a7f0920f39ba33bdc4af54531ffe40b1e.tar.gz
New :request_access ability to replace a ugly helper
- Group / project members cannot request access - Group members cannot request access to a group's project This addresses an issue where project owners could request access to their own project, leading to UI inconsistency where their requester status would replace their owner status. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/helpers/members_helper.rb')
-rw-r--r--app/helpers/members_helper.rb11
1 files changed, 0 insertions, 11 deletions
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb
index c70cd19b587..ec106418f2d 100644
--- a/app/helpers/members_helper.rb
+++ b/app/helpers/members_helper.rb
@@ -12,17 +12,6 @@ module MembersHelper
can?(current_user, action_member_permission(:admin, member), member.source)
end
- def can_see_request_access_button?(source)
- source_parent = source.respond_to?(:group) && source.group
-
- return false if source_parent && source.group.members.exists?(user_id: current_user.id)
- return false if source_parent && source.group.requesters.exists?(user_id: current_user.id)
- return false if source.members.exists?(user_id: current_user.id)
- return true if source.requesters.exists?(user_id: current_user.id)
-
- true
- end
-
def remove_member_message(member, user: nil)
user = current_user if defined?(current_user)