summaryrefslogtreecommitdiff
path: root/app/models/project_team.rb
diff options
context:
space:
mode:
authorDavid Alexander <davidpaulalexander@gmail.com>2016-03-14 09:13:35 -0400
committerRémy Coutable <remy@rymai.me>2016-06-14 12:12:02 +0200
commit17c22156c5fa5663aae65178ed38cbeef9a80b7e (patch)
tree5bd90d34c7360c892f6ea57dd1d3e4a6350a51cd /app/models/project_team.rb
parent0c0ef7dfb6afb1695b62037fc0fa5aba6ce697d7 (diff)
downloadgitlab-ce-17c22156c5fa5663aae65178ed38cbeef9a80b7e.tar.gz
Initial implementation of user access request to projects
Diffstat (limited to 'app/models/project_team.rb')
-rw-r--r--app/models/project_team.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb
index e29e854860a..769b73666ce 100644
--- a/app/models/project_team.rb
+++ b/app/models/project_team.rb
@@ -115,6 +115,12 @@ class ProjectTeam
false
end
+ def pending?(user)
+ project.project_members.each do |member|
+ return member.pending? if member.user_id == user.id
+ end
+ end
+
def guest?(user)
max_member_access(user.id) == Gitlab::Access::GUEST
end