diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-09-20 17:23:00 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-09-20 17:23:00 +0300 |
commit | ff7b545c8e462b909af92a5bea58de779c3f438b (patch) | |
tree | bdd6a8bc3c8527df2925288348c752eb87d1b9ea /app/policies | |
parent | 55a7529621515eaeffa1424a281e639cf74be6cf (diff) | |
parent | ff1deab6388dcb7f241205a1cd64eaddf1672753 (diff) |
Merge remote-tracking branch 'origin/master' into 18608-lock-issues
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/group_policy.rb | 3 | ||||
-rw-r--r-- | app/policies/project_policy.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index 420991ff6d6..8af9738d75c 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -9,6 +9,7 @@ class GroupPolicy < BasePolicy condition(:has_access) { access_level != GroupMember::NO_ACCESS } condition(:guest) { access_level >= GroupMember::GUEST } + condition(:developer) { access_level >= GroupMember::DEVELOPER } condition(:owner) { access_level >= GroupMember::OWNER } condition(:master) { access_level >= GroupMember::MASTER } condition(:reporter) { access_level >= GroupMember::REPORTER } @@ -33,11 +34,11 @@ class GroupPolicy < BasePolicy rule { admin } .enable :read_group rule { has_projects } .enable :read_group + rule { developer }.enable :admin_milestones rule { reporter }.enable :admin_label rule { master }.policy do enable :create_projects - enable :admin_milestones enable :admin_pipeline enable :admin_build end diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index a925fac7d3e..b7b5bd34189 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -155,6 +155,7 @@ class ProjectPolicy < BasePolicy rule { can?(:developer_access) }.policy do enable :admin_merge_request + enable :admin_milestone enable :update_merge_request enable :create_commit_status enable :update_commit_status @@ -178,7 +179,6 @@ class ProjectPolicy < BasePolicy enable :update_project_snippet enable :update_environment enable :update_deployment - enable :admin_milestone enable :admin_project_snippet enable :admin_project_member enable :admin_note |