[ARVADOS] updated: 57dbb702fde186b90fb2ad2504a35603a33b15dc
git at public.curoverse.com
git at public.curoverse.com
Mon Jan 13 13:47:46 EST 2014
Summary of changes:
.../v1/api_client_authorizations_controller.rb | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
via 57dbb702fde186b90fb2ad2504a35603a33b15dc (commit)
from ff458bd54745cc49632324f29934039a623f4287 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 57dbb702fde186b90fb2ad2504a35603a33b15dc
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Jan 13 10:46:20 2014 -0800
Allow admin client to create API tokens for other users.
refs #1680
diff --git a/services/api/app/controllers/arvados/v1/api_client_authorizations_controller.rb b/services/api/app/controllers/arvados/v1/api_client_authorizations_controller.rb
index 19feec9..17c5c4b 100644
--- a/services/api/app/controllers/arvados/v1/api_client_authorizations_controller.rb
+++ b/services/api/app/controllers/arvados/v1/api_client_authorizations_controller.rb
@@ -19,6 +19,17 @@ class Arvados::V1::ApiClientAuthorizationsController < ApplicationController
render :json => api_client_auth.as_api_response(:superuser)
end
+ def create
+ if resource_attrs[:owner_uuid]
+ # The model has an owner_id attribute instead of owner_uuid, but
+ # we can't expect the client to know the local numeric ID. We
+ # translate UUID to numeric ID here.
+ resource_attrs[:user_id] =
+ User.where(uuid: resource_attrs.delete(:owner_uuid)).first.andand.id
+ end
+ super
+ end
+
protected
def find_objects_for_index
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list