[ARVADOS] created: b9ce584056c53253ef5c8fd19f30c20cb521b0b8
git at public.curoverse.com
git at public.curoverse.com
Fri Sep 12 10:26:50 EDT 2014
at b9ce584056c53253ef5c8fd19f30c20cb521b0b8 (commit)
commit b9ce584056c53253ef5c8fd19f30c20cb521b0b8
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Sep 12 10:25:55 2014 -0400
3605: Provide "info" field to all requesters. Filters out any keys with text
"secret" to non-admin users. Also fix fiddlesticks on workbench viewing
details for node.
diff --git a/apps/workbench/app/views/application/_arvados_attr_value.html.erb b/apps/workbench/app/views/application/_arvados_attr_value.html.erb
index 52c46fb..3df892f 100644
--- a/apps/workbench/app/views/application/_arvados_attr_value.html.erb
+++ b/apps/workbench/app/views/application/_arvados_attr_value.html.erb
@@ -3,7 +3,7 @@
<%= message %><br />
<% end %>
<% else %>
- <% if obj.attribute_editable?(attr) and (!defined?(editable) || editable) %>
+ <% if attr and obj.attribute_editable?(attr) and (!defined?(editable) || editable) %>
<% if resource_class_for_uuid(attrvalue, {referring_object: obj, referring_attr: attr}) %>
<%= link_to_if_arvados_object attrvalue, {referring_attr: attr, referring_object: obj, with_class_name: true, friendly_name: true} %>
<br>
diff --git a/services/api/app/models/node.rb b/services/api/app/models/node.rb
index 71d4dea..960142e 100644
--- a/services/api/app/models/node.rb
+++ b/services/api/app/models/node.rb
@@ -20,16 +20,19 @@ class Node < ArvadosModel
t.add :slot_number
t.add :status
t.add :crunch_worker_state
+ t.add :info
end
api_accessible :superuser, :extend => :user do |t|
t.add :first_ping_at
- t.add :info
t.add lambda { |x| @@nameservers }, :as => :nameservers
end
def info
- @info ||= Hash.new
- super
+ if current_user.andand.current_user.is_admin
+ super
+ else
+ super.select { |k| not k.to_s.include? "secret" }
+ end
end
def domain
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list