Commit 093cc906 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'ee-issue_36138' into 'master'

[EE port]  Allow to delete group milestones

See merge request gitlab-org/gitlab-ee!6999
parents ba9faa12 a95bc144
...@@ -18,7 +18,7 @@ module EE ...@@ -18,7 +18,7 @@ module EE
return false if cookies['hide_burndown_message'].present? return false if cookies['hide_burndown_message'].present?
return false unless milestone.supports_burndown_charts? return false unless milestone.supports_burndown_charts?
warning.nil? && can_admin_milestone?(milestone) warning.nil? && can?(current_user, :admin_milestone, milestone.parent)
end end
def data_warning_for(burndown) def data_warning_for(burndown)
...@@ -45,13 +45,5 @@ module EE ...@@ -45,13 +45,5 @@ module EE
_("Weight %{weight}") % { weight: weight } _("Weight %{weight}") % { weight: weight }
end end
end end
private
def can_admin_milestone?(milestone)
policy_name = milestone.group_milestone? ? :admin_milestones : :admin_milestone
can?(current_user, policy_name, milestone.parent)
end
end end
end end
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