blob: 550d8578396a2fd7af3022d5051511aea20de8c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
class Projects::DesignManagement::DesignsController < Projects::ApplicationController
before_action :authorize_read_design!
feature_category :design_management
private
def authorize_read_design!
unless can?(current_user, :read_design, design)
access_denied!
end
end
def design
@design ||= project.designs.find(params[:design_id])
end
def sha
params[:sha].presence
end
end
|