gitlab-org--gitlab-foss/app/controllers/projects/boards_controller.rb

29 lines
776 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-08-01 16:09:41 +00:00
class Projects::BoardsController < Projects::ApplicationController
include MultipleBoardsActions
2017-08-31 17:48:57 +00:00
include IssuableCollections
before_action :check_issues_available!
before_action :authorize_read_board!, only: [:index, :show]
2017-08-28 21:56:49 +00:00
before_action :assign_endpoint_vars
before_action do
push_frontend_feature_flag(:add_issues_button)
end
feature_category :boards
private
2017-08-28 21:56:49 +00:00
def assign_endpoint_vars
2017-12-03 18:46:07 +00:00
@boards_endpoint = project_boards_path(project)
2017-08-28 21:56:49 +00:00
@bulk_issues_path = bulk_update_project_issues_path(project)
2017-09-04 19:55:29 +00:00
@namespace_path = project.namespace.full_path
2017-08-28 21:56:49 +00:00
@labels_endpoint = project_labels_path(project)
end
def authorize_read_board!
access_denied! unless can?(current_user, :read_board, project)
end
2016-08-01 16:09:41 +00:00
end