diff options
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/project_policy.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 8a1148dece4..54f5f95cd65 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -130,17 +130,10 @@ class ProjectPolicy < BasePolicy def team_access!(user) access = project.team.max_member_access(user.id) - return if access < Gitlab::Access::GUEST - guest_access! - - return if access < Gitlab::Access::REPORTER - reporter_access! - - return if access < Gitlab::Access::DEVELOPER - developer_access! - - return if access < Gitlab::Access::MASTER - master_access! + guest_access! if access >= Gitlab::Access::GUEST + reporter_access! if access >= Gitlab::Access::REPORTER + developer_access! if access >= Gitlab::Access::DEVELOPER + master_access! if access >= Gitlab::Access::MASTER end def archived_access! |