11718: Update crunch-run for docker client API change in ContainerWait().
[arvados.git] / services / api / app / models / api_client_authorization.rb
index f7985a986afa304806cac1a551c1603615e92196..b0c2f31e4f00f05194b8c6beafb2ef0934f29344 100644 (file)
@@ -61,7 +61,13 @@ class ApiClientAuthorization < ArvadosModel
   end
 
   def scopes_allow_request?(request)
-    scopes_allow? [request.request_method, request.path].join(' ')
+    method = request.request_method
+    if method == 'HEAD'
+      (scopes_allow?(['HEAD', request.path].join(' ')) ||
+       scopes_allow?(['GET', request.path].join(' ')))
+    else
+      scopes_allow?([method, request.path].join(' '))
+    end
   end
 
   def logged_attributes