X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/39c17737ac69d7693684fe2f95bef0ec235a28bf..8c30c649c667f7ccd205cdfcf1864563ac503585:/services/api/app/models/collection.rb diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index 85b12a377b..ddb85862a2 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -94,7 +94,7 @@ class Collection < ArvadosModel # Check permissions on the collection manifest. # If any signature cannot be verified, raise PermissionDeniedError # which will return 403 Permission denied to the client. - api_token = current_api_client_authorization.andand.api_token + api_token = Thread.current[:token] signing_opts = { api_token: api_token, now: @validation_timestamp.to_i, @@ -244,7 +244,7 @@ class Collection < ArvadosModel elsif is_trashed return manifest_text else - token = current_api_client_authorization.andand.api_token + token = Thread.current[:token] exp = [db_current_time.to_i + Rails.configuration.blob_signature_ttl, trash_at].compact.map(&:to_i).min self.class.sign_manifest manifest_text, token, exp