summaryrefslogtreecommitdiff
path: root/app/policies/group_policy.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2017-09-13 17:32:58 -0300
committerFelipe Artur <felipefac@gmail.com>2017-09-18 17:15:38 -0300
commit5bfb6357ef4af408401f68a388ab4a1521af8903 (patch)
treecc2d508564890ad22735f627dc46207787918130 /app/policies/group_policy.rb
parentf06d370b20ffbb7b8dba83b841df053b39cf3b1a (diff)
downloadgitlab-ce-5bfb6357ef4af408401f68a388ab4a1521af8903.tar.gz
Allow DEVELOPER role to admin milestonesissue_32215
Diffstat (limited to 'app/policies/group_policy.rb')
-rw-r--r--app/policies/group_policy.rb3
1 files changed, 2 insertions, 1 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