diff options
author | Valery Sizov <valery@gitlab.com> | 2014-10-08 16:44:25 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2014-10-09 17:09:53 +0300 |
commit | 47f539f5a6a930b2cfd4f9834b4d1bd5e1c180cb (patch) | |
tree | 0b528d431aa1625d92d3598f6a86ef8aa93b6491 /app/models/project_team.rb | |
parent | f7dc15c6bdb75a5f611c389ece3fe251f94a2d8f (diff) | |
download | gitlab-ce-47f539f5a6a930b2cfd4f9834b4d1bd5e1c180cb.tar.gz |
Snippets: public/internal/private
Diffstat (limited to 'app/models/project_team.rb')
-rw-r--r-- | app/models/project_team.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb index e065554d3b8..657ee23ae23 100644 --- a/app/models/project_team.rb +++ b/app/models/project_team.rb @@ -133,6 +133,10 @@ class ProjectTeam max_tm_access(user.id) == Gitlab::Access::MASTER end + def member?(user_id) + !!find_tm(user_id) + end + def max_tm_access(user_id) access = [] access << project.project_members.find_by(user_id: user_id).try(:access_field) |