Commit d7bd2009 authored by http://jneen.net/'s avatar http://jneen.net/

use a more compact style for access policies

parent 71765536
...@@ -130,17 +130,10 @@ class ProjectPolicy < BasePolicy ...@@ -130,17 +130,10 @@ class ProjectPolicy < BasePolicy
def team_access!(user) def team_access!(user)
access = project.team.max_member_access(user.id) access = project.team.max_member_access(user.id)
return if access < Gitlab::Access::GUEST guest_access! if access >= Gitlab::Access::GUEST
guest_access! reporter_access! if access >= Gitlab::Access::REPORTER
developer_access! if access >= Gitlab::Access::DEVELOPER
return if access < Gitlab::Access::REPORTER master_access! if access >= Gitlab::Access::MASTER
reporter_access!
return if access < Gitlab::Access::DEVELOPER
developer_access!
return if access < Gitlab::Access::MASTER
master_access!
end end
def archived_access! def archived_access!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment