debian-mirror-gitlab/app/controllers/projects/boards_controller.rb

28 lines
845 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2016-09-13 17:45:13 +05:30
class Projects::BoardsController < Projects::ApplicationController
2019-09-30 21:07:59 +05:30
include MultipleBoardsActions
2016-11-03 12:29:30 +05:30
include IssuableCollections
2016-09-13 17:45:13 +05:30
2018-03-17 18:26:18 +05:30
before_action :check_issues_available!
2016-11-03 12:29:30 +05:30
before_action :authorize_read_board!, only: [:index, :show]
2018-03-17 18:26:18 +05:30
before_action :assign_endpoint_vars
2019-12-21 20:55:43 +05:30
before_action do
2019-12-26 22:10:19 +05:30
push_frontend_feature_flag(:multi_select_board, default_enabled: true)
2020-04-22 19:07:51 +05:30
push_frontend_feature_flag(:sfc_issue_boards, default_enabled: true)
2019-12-21 20:55:43 +05:30
end
2016-09-13 17:45:13 +05:30
private
2018-03-17 18:26:18 +05:30
def assign_endpoint_vars
@boards_endpoint = project_boards_path(project)
@bulk_issues_path = bulk_update_project_issues_path(project)
@namespace_path = project.namespace.full_path
@labels_endpoint = project_labels_path(project)
end
2016-09-13 17:45:13 +05:30
def authorize_read_board!
2018-12-13 13:39:08 +05:30
access_denied! unless can?(current_user, :read_board, project)
2016-09-13 17:45:13 +05:30
end
end