use message verifier purpose
This commit is contained in:
@@ -8,9 +8,9 @@ module Api
|
||||
skip_authorization_check
|
||||
|
||||
def show
|
||||
blob_uuid = ApplicationRecord.signed_id_verifier.verified(params[:signed_uuid])
|
||||
blob_uuid, = ApplicationRecord.signed_id_verifier.verified(params[:signed_uuid])
|
||||
|
||||
unless blob_uuid
|
||||
if blob_uuid.blank?
|
||||
Rollbar.error('Blob not found') if defined?(Rollbar)
|
||||
|
||||
return head :not_found
|
||||
|
||||
@@ -15,7 +15,8 @@ module Api
|
||||
|
||||
is_permitted = blob.attachments.any? do |a|
|
||||
(current_user && a.record.account.id == current_user.account_id) ||
|
||||
a.record.account.account_configs.any? { |e| e.key == 'legacy_blob_proxy' }
|
||||
a.record.account.account_configs.any? { |e| e.key == 'legacy_blob_proxy' } ||
|
||||
a.name == 'logo'
|
||||
end
|
||||
|
||||
unless is_permitted
|
||||
|
||||
Reference in New Issue
Block a user