summaryrefslogtreecommitdiff
path: root/app/policies
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
parentf06d370b20ffbb7b8dba83b841df053b39cf3b1a (diff)
downloadgitlab-ce-5bfb6357ef4af408401f68a388ab4a1521af8903.tar.gz
Allow DEVELOPER role to admin milestonesissue_32215
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/group_policy.rb3
-rw-r--r--app/policies/project_policy.rb2
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