[ARVADOS] updated: 1.3.0-730-g41a86f4d5
Git user
git at public.curoverse.com
Tue May 7 20:27:51 UTC 2019
Summary of changes:
apps/workbench/app/controllers/sessions_controller.rb | 2 +-
apps/workbench/app/models/arvados_base.rb | 18 +++++++++++++++---
apps/workbench/app/models/user.rb | 4 ++--
3 files changed, 18 insertions(+), 6 deletions(-)
via 41a86f4d59ac63acb8c78d55b8c4a0d042941568 (commit)
via 53e3c1939d7d8f2d6c1055c1018e89060b7c1653 (commit)
from 23a70b3597649d58014fa8968271b8c850306af9 (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 41a86f4d59ac63acb8c78d55b8c4a0d042941568
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Tue May 7 17:26:33 2019 -0300
14988: Fixes .dup method behavior on ArvadosBase.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/apps/workbench/app/models/arvados_base.rb b/apps/workbench/app/models/arvados_base.rb
index 9925d4612..a25d8ae01 100644
--- a/apps/workbench/app/models/arvados_base.rb
+++ b/apps/workbench/app/models/arvados_base.rb
@@ -104,7 +104,7 @@ class ArvadosBase
attributes.symbolize_keys.each do |name, value|
send("#{name}=", value)
end
-end
+ end
def self.columns
return @discovered_columns if @discovered_columns.andand.any?
@@ -133,7 +133,14 @@ end
end
def new_record?
- (uuid == nil) ? true : false
+ # dup method doesn't reset the uuid attr
+ @uuid.nil? || @new_record || false
+ end
+
+ def initialize_dup(other)
+ super
+ @new_record = true
+ @created_at = nil
end
def self.column(name, sql_type = nil, default = nil, null = true)
@@ -152,6 +159,8 @@ end
ArvadosBase::Type::Hash
when 'Array'
ArvadosBase::Type::Array
+ when 'jsonb'
+ ArvadosBase::Type::Hash
else
raise ArvadosBase::Error.new("Type unknown: #{sql_type}")
end
@@ -316,7 +325,10 @@ end
obdata.delete :uuid
resp = arvados_api_client.api(self.class, '/' + uuid, postdata)
else
- postdata.merge!(@create_params) if @create_params
+ if @create_params
+ @create_params = @create_params.to_unsafe_hash if @create_params.is_a? ActionController::Parameters
+ postdata.merge!(@create_params)
+ end
resp = arvados_api_client.api(self.class, '', postdata)
end
return false if !resp[:etag] || !resp[:uuid]
diff --git a/apps/workbench/app/models/user.rb b/apps/workbench/app/models/user.rb
index 865ff6e95..34e818151 100644
--- a/apps/workbench/app/models/user.rb
+++ b/apps/workbench/app/models/user.rb
@@ -109,7 +109,7 @@ class User < ArvadosBase
false
end
- def self.creatable?
+ def self.creatable?
current_user and current_user.is_admin
- end
+ end
end
commit 53e3c1939d7d8f2d6c1055c1018e89060b7c1653
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Tue May 7 10:53:24 2019 -0300
14988: Fixes exception raising when logging out.
See: https://stackoverflow.com/a/41266746
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/apps/workbench/app/controllers/sessions_controller.rb b/apps/workbench/app/controllers/sessions_controller.rb
index 02db33d64..bff0f9f1c 100644
--- a/apps/workbench/app/controllers/sessions_controller.rb
+++ b/apps/workbench/app/controllers/sessions_controller.rb
@@ -6,7 +6,7 @@ class SessionsController < ApplicationController
skip_around_action :require_thread_api_token, :only => [:destroy, :logged_out]
skip_around_action :set_thread_api_token, :only => [:destroy, :logged_out]
skip_before_action :find_object_by_uuid
- skip_before_action :find_objects_for_index
+ skip_before_action :find_objects_for_index, raise: false
skip_before_action :ensure_arvados_api_exists
def destroy
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list