2020-05-24 23:13:21 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Projects::DesignManagement::DesignsController < Projects::ApplicationController
|
|
|
|
before_action :authorize_read_design!
|
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
feature_category :design_management
|
|
|
|
|
2020-05-24 23:13:21 +05:30
|
|
|
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
|