X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ce4299cdb9bd265cc1b1e4af8086f0031342aabb..2a23694d15d95ab0645c12e4c50ad7dba614d188:/services/api/app/controllers/user_sessions_controller.rb diff --git a/services/api/app/controllers/user_sessions_controller.rb b/services/api/app/controllers/user_sessions_controller.rb index 3ac47d46cf..3674c010cb 100644 --- a/services/api/app/controllers/user_sessions_controller.rb +++ b/services/api/app/controllers/user_sessions_controller.rb @@ -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('?')