summaryrefslogtreecommitdiff
path: root/app/models/concerns/access_requestable.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-02 18:05:06 +0200
committerRémy Coutable <remy@rymai.me>2016-06-14 13:18:14 +0200
commit515205d3c1c6655302ed0ae44cc5954dead7ae79 (patch)
tree5ac24884eb0e6faf56e1e460260303fbdb14b9cf /app/models/concerns/access_requestable.rb
parent6d103a2f4764441b1650ba6d790732056c9a8516 (diff)
downloadgitlab-ce-515205d3c1c6655302ed0ae44cc5954dead7ae79.tar.gz
UI and copywriting improvements13948-access-request-to-projects-and-groups
+ Move 'Edit Project/Group' out of membership-related partial + Show the access request buttons only to logged-in users + Put the request access buttons out of in a more visible button + Improve the copy in the #remove_member_message helper Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/concerns/access_requestable.rb')
-rw-r--r--app/models/concerns/access_requestable.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/app/models/concerns/access_requestable.rb b/app/models/concerns/access_requestable.rb
index cf37284e31a..eedd32a729f 100644
--- a/app/models/concerns/access_requestable.rb
+++ b/app/models/concerns/access_requestable.rb
@@ -10,18 +10,7 @@ module AccessRequestable
def request_access(user)
members.create(
access_level: Gitlab::Access::DEVELOPER,
- created_by: user,
+ user: user,
requested_at: Time.now.utc)
end
-
- def access_requested?(user)
- members.where(created_by_id: user.id).where.not(requested_at: nil).any?
- end
-
- private
-
- # Returns a `<entities>_members` association, e.g.: project_members, group_members
- def members
- @members ||= send("#{self.class.to_s.underscore}_members".to_sym)
- end
end