diff options
Diffstat (limited to 'app/models/project_team.rb')
-rw-r--r-- | app/models/project_team.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb index eca13e56061..639f78dcd3f 100644 --- a/app/models/project_team.rb +++ b/app/models/project_team.rb @@ -117,6 +117,22 @@ class ProjectTeam false end + def guest?(user) + find_tm(user.id).access_field == Gitlab::Access::GUEST + end + + def reporter?(user) + find_tm(user.id).access_field == Gitlab::Access::REPORTER + end + + def developer?(user) + find_tm(user.id).access_field == Gitlab::Access::DEVELOPER + end + + def master?(user) + find_tm(user.id).access_field == Gitlab::Access::MASTER + end + private def fetch_members(level = nil) |