diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-24 20:06:04 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-29 11:14:42 +0300 |
commit | eb0a17ba4bf05b7bcefb31755381d08fd689b818 (patch) | |
tree | 0a6bcdf0fea8dd6dacefc4987164ab297c77877d | |
parent | fa030cbc85470edbff8e8c225a9fc7d6e52bfa9b (diff) |
replace `is_team_member?` with `team_member?`
-rw-r--r-- | app/policies/project_policy.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 0133091db57..a925fac7d3e 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -17,13 +17,13 @@ class ProjectPolicy < BasePolicy desc "Project has public builds enabled" condition(:public_builds, scope: :subject) { project.public_builds? } - # For guest access we use #is_team_member? so we can use + # For guest access we use #team_member? so we can use # project.members, which gets cached in subject scope. # This is safe because team_access_level is guaranteed # by ProjectAuthorization's validation to be at minimum # GUEST desc "User has guest access" - condition(:guest) { is_team_member? } + condition(:guest) { team_member? } desc "User has reporter access" condition(:reporter) { team_access_level >= Gitlab::Access::REPORTER } @@ -293,7 +293,7 @@ class ProjectPolicy < BasePolicy private - def is_team_member? + def team_member? return false if @user.nil? greedy_load_subject = false |