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

24 lines
664 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-05-18 00:54:41 +05:30
include BoardsActions
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
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