projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 2525-java-sdk
[arvados.git]
/
services
/
api
/
app
/
controllers
/
arvados
/
v1
/
users_controller.rb
diff --git
a/services/api/app/controllers/arvados/v1/users_controller.rb
b/services/api/app/controllers/arvados/v1/users_controller.rb
index de067ce015136f7a3ea6a0f7fbf400021b4d7ba1..c2a32f02f1b7e0e68bd8da293e34a0269308b4c0 100644
(file)
--- a/
services/api/app/controllers/arvados/v1/users_controller.rb
+++ b/
services/api/app/controllers/arvados/v1/users_controller.rb
@@
-74,7
+74,7
@@
class Arvados::V1::UsersController < ApplicationController
head_uuid: required_uuids).
collect(&:head_uuid)
todo_uuids = required_uuids - signed_uuids
head_uuid: required_uuids).
collect(&:head_uuid)
todo_uuids = required_uuids - signed_uuids
- if todo_uuids
== []
+ if todo_uuids
.empty?
@object.update_attributes is_active: true
logger.info "User #{@object.uuid} activated"
else
@object.update_attributes is_active: true
logger.info "User #{@object.uuid} activated"
else
@@
-130,6
+130,11
@@
class Arvados::V1::UsersController < ApplicationController
params[:repo_name], params[:vm_uuid]
end
params[:repo_name], params[:vm_uuid]
end
+ # setup succeeded. send email to user
+ if params[:send_notification_email] == true || params[:send_notification_email] == 'true'
+ UserNotifier.account_is_setup(@object).deliver
+ end
+
render json: { kind: "arvados#HashList", items: @response.as_api_response(nil) }
end
render json: { kind: "arvados#HashList", items: @response.as_api_response(nil) }
end
@@
-140,4
+145,12
@@
class Arvados::V1::UsersController < ApplicationController
show
end
show
end
+ protected
+
+ def self._setup_requires_parameters
+ {
+ send_notification_email: { type: 'boolean', required: true },
+ }
+ end
+
end
end