projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '16809-s3-v4-signature'
[arvados.git]
/
services
/
api
/
app
/
models
/
api_client_authorization.rb
diff --git
a/services/api/app/models/api_client_authorization.rb
b/services/api/app/models/api_client_authorization.rb
index 76b722694aa763baeb79a2ce621c620383c139a2..518fe569377ab1b2c2b21880e4f3411aa340844a 100644
(file)
--- a/
services/api/app/models/api_client_authorization.rb
+++ b/
services/api/app/models/api_client_authorization.rb
@@
-268,14
+268,12
@@
class ApiClientAuthorization < ArvadosModel
end
act_as_system_user do
end
act_as_system_user do
- user.save!
-
if (user.is_active && !remote_user['is_active']) or (user.is_invited && !remote_user['is_invited'])
if (user.is_active && !remote_user['is_active']) or (user.is_invited && !remote_user['is_invited'])
- # If the user is newly created and AutoSetupNewUsers is
- # true, they will auto-setup in an after_create hook.
- # Synchronize the user's "active/invited" state state after the record
- # has been saved.
+ # Synchronize the user's "active/invited" state state. This
+ # also saves the record.
user.unsetup
user.unsetup
+ else
+ user.save!
end
# We will accept this token (and avoid reloading the user
end
# We will accept this token (and avoid reloading the user