summaryrefslogtreecommitdiff
path: root/app/controllers/projects/boards_controller.rb
blob: 3320671708983bc8c6d11c64abf96444c355836f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Projects::BoardsController < Projects::ApplicationController
  respond_to :html

  before_action :authorize_read_board!, only: [:show]

  def show
    ::Boards::CreateService.new(project, current_user).execute
  end

  private

  def authorize_read_board!
    return access_denied! unless can?(current_user, :read_board, project)
  end
end