diff --git a/app/controllers/assets_controller.rb b/app/controllers/assets_controller.rb index 382b5ed86..813298a3f 100644 --- a/app/controllers/assets_controller.rb +++ b/app/controllers/assets_controller.rb @@ -22,12 +22,11 @@ class AssetsController < ApplicationController before_action :check_restore_permission, only: :restore_version def file_preview - editable = can_manage_asset?(@asset) && @asset.repository_asset_value.blank? render json: { html: render_to_string( partial: 'shared/file_preview/content', locals: { asset: @asset, - can_edit: editable, + can_edit: can_manage_asset?(@asset), gallery: params[:gallery], preview: params[:preview] },