Commit d1356dc9 authored by Felipe Artur's avatar Felipe Artur

Fix lists controller

parent d8ef8da0
module Boards
class ListsController < Boards::ApplicationController
# before_action :authorize_admin_list!, only: [:create, :update, :destroy, :generate]
# before_action :authorize_read_list!, only: [:index]
#before_action :authorize_admin_list!, only: [:create, :update, :destroy, :generate]
#before_action :authorize_read_list!, only: [:index]
def index
lists = ::Boards::Lists::ListService.new(project, current_user).execute(board)
lists = ::Boards::Lists::ListService.new(board.parent, current_user).execute(board)
render json: serialize_as_json(lists)
end
......@@ -62,7 +62,7 @@ module Boards
end
def board
@board ||= project.boards.find(params[:board_id])
@board ||= Board.find(params[:board_id])
end
def list_params
......
......@@ -21,6 +21,10 @@ module EE
end
end
def parent
group || project
end
def as_json(options = {})
milestone_attrs = options.fetch(:include, {})
.extract!(:milestone)
......
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