Commit 91c1fa7c authored by Axel García's avatar Axel García Committed by Miguel Rincon

Properly add initial data to the epic presenter

parent 07290d35
# frozen_string_literal: true
module EpicsHelper
def epic_initial_data(epic)
issuable_initial_data(epic).merge(canCreate: can?(current_user, :create_epic, epic.group))
end
def epic_show_app_data(epic)
EpicPresenter.new(epic, current_user: current_user).show_data(author_icon: avatar_icon_for_user(epic.author), base_data: issuable_initial_data(epic))
EpicPresenter.new(epic, current_user: current_user).show_data(author_icon: avatar_icon_for_user(epic.author), base_data: epic_initial_data(epic))
end
def epic_new_app_data(group)
......
......@@ -44,8 +44,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
def initial_data
{
labels: epic.labels,
subscribed: subscribed?,
canCreate: can?(current_user, :create_epic, epic)
subscribed: subscribed?
}
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