Merge branch '1932-job-output-persistent'
[arvados.git] / services / api / app / controllers / user_sessions_controller.rb
index 3ac47d46cf221bd7bf9b549281892e2f6e9326d7..3674c010cb7bcd97ae808483997ef5118554042f 100644 (file)
@@ -2,6 +2,7 @@ class UserSessionsController < ApplicationController
   before_filter :require_auth_scope_all, :only => [ :destroy ]
 
   skip_before_filter :find_object_by_uuid
+  skip_before_filter :render_404_if_no_object
 
   respond_to :html
 
@@ -28,7 +29,7 @@ class UserSessionsController < ApplicationController
                  tail_kind: 'email',
                  tail_uuid: omniauth['info']['email'],
                  head_kind: 'arvados#user').each do |link|
-        if prefix = link.properties[:identity_url_prefix]
+        if prefix = link.properties['identity_url_prefix']
           if prefix == omniauth['info']['identity_url'][0..prefix.size-1]
             user = User.find_by_uuid(link.head_uuid)
             break if user
@@ -120,7 +121,8 @@ class UserSessionsController < ApplicationController
     api_client_auth = ApiClientAuthorization.
       new(user: user,
           api_client: @api_client,
-          created_by_ip_address: remote_ip)
+          created_by_ip_address: remote_ip,
+          scopes: ["all"])
     api_client_auth.save!
 
     if callback_url.index('?')