Allow send wopi action without manage permission [SCI-9836] (#7178)

This commit is contained in:
wandji 2024-03-06 14:17:17 +01:00 committed by GitHub
parent 654b107965
commit a9ceda717b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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