mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-22 23:03:00 +08:00
Fix checking asset blob permissions [SCI-9353]
This commit is contained in:
parent
20be895938
commit
f620a99577
1 changed files with 2 additions and 2 deletions
|
@ -17,6 +17,8 @@ module ActiveStorage
|
|||
end
|
||||
|
||||
def check_attachment_read_permissions(attachment)
|
||||
current_user.permission_team = attachment.record.team || current_team if attachment.record.respond_to?(:team)
|
||||
|
||||
case attachment.record_type
|
||||
when 'Asset'
|
||||
check_asset_read_permissions(attachment.record)
|
||||
|
@ -58,8 +60,6 @@ module ActiveStorage
|
|||
def check_tinymce_asset_read_permissions(asset)
|
||||
return render_403 unless asset
|
||||
|
||||
current_user.permission_team = asset.team || current_team
|
||||
|
||||
return true if asset.object.nil? && can_read_team?(asset.team)
|
||||
|
||||
case asset.object_type
|
||||
|
|
Loading…
Reference in a new issue