Fix rendering of WOPI files [SCI-6936] (#4235)

This commit is contained in:
artoscinote 2022-07-13 12:21:56 +02:00 committed by GitHub
parent a575487271
commit 15e812a358
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ class AssetSerializer < ActiveModel::Serializer
delete: asset_destroy_path(object)
)
end
if wopi && can_manage_asset?(@asset)
if wopi && can_manage_asset?(object)
urls[:wopi_action] = object.get_action_url(@instance_options[:user], 'embedview')
end
urls[:blob] = rails_blob_path(object.file, disposition: 'attachment') if object.file.attached?