[ARVADOS] updated: 8bb852474590b57c2476b0972100c4659dc60815

git at public.curoverse.com git at public.curoverse.com
Tue Nov 18 09:50:14 EST 2014


Summary of changes:
 apps/workbench/app/views/users/_show_admin.html.erb |  2 +-
 services/api/app/controllers/database_controller.rb |  3 +++
 services/api/app/models/database_seeds.rb           | 11 +++++++++++
 services/api/db/seeds.rb                            |  9 +--------
 4 files changed, 16 insertions(+), 9 deletions(-)
 create mode 100644 services/api/app/models/database_seeds.rb

       via  8bb852474590b57c2476b0972100c4659dc60815 (commit)
       via  c0d9c656eefcb684c72fd2a1bca20b8b9c60df96 (commit)
      from  14f2906a390d957bc17a9951667daf1eada37e47 (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 8bb852474590b57c2476b0972100c4659dc60815
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Nov 18 09:49:08 2014 -0500

    4533: Fix crash on nonexistent (or non-User) owner_uuid of role group.

diff --git a/apps/workbench/app/views/users/_show_admin.html.erb b/apps/workbench/app/views/users/_show_admin.html.erb
index 262dfa0..a34d7e6 100644
--- a/apps/workbench/app/views/users/_show_admin.html.erb
+++ b/apps/workbench/app/views/users/_show_admin.html.erb
@@ -83,7 +83,7 @@
                 <small>group→user</small>
               </label>
               <label class="checkbox-inline">
-                <%= group.name || '(unnamed)' %> <span class="deemphasize">(owned by <%= User.find(group.owner_uuid).andand.full_name %>)</span>
+                <%= group.name || '(unnamed)' %> <span class="deemphasize">(owned by <%= User.find?(group.owner_uuid).andand.full_name %>)</span>
               </label>
             </div>
           <% end.empty? and begin %>

commit c0d9c656eefcb684c72fd2a1bca20b8b9c60df96
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Nov 18 09:48:15 2014 -0500

    4533: Reload database seeds during reset.

diff --git a/services/api/app/controllers/database_controller.rb b/services/api/app/controllers/database_controller.rb
index e0db2a7..4a872eb 100644
--- a/services/api/app/controllers/database_controller.rb
+++ b/services/api/app/controllers/database_controller.rb
@@ -27,6 +27,9 @@ class DatabaseController < ApplicationController
     Rails.cache.clear
     ActiveRecord::Base.connection.clear_query_cache
 
+    # Reload database seeds
+    DatabaseSeeds.install
+
     # Done.
     render json: {success: true}
   end
diff --git a/services/api/app/models/database_seeds.rb b/services/api/app/models/database_seeds.rb
new file mode 100644
index 0000000..93d5254
--- /dev/null
+++ b/services/api/app/models/database_seeds.rb
@@ -0,0 +1,11 @@
+class DatabaseSeeds
+  include CurrentApiClient
+  def self.install
+    system_user
+    system_group
+    anonymous_group
+    anonymous_user
+    empty_collection
+  end
+end
+
diff --git a/services/api/db/seeds.rb b/services/api/db/seeds.rb
index d397b91..384d2e2 100644
--- a/services/api/db/seeds.rb
+++ b/services/api/db/seeds.rb
@@ -2,11 +2,4 @@
 #
 # It is invoked by `rake db:seed` and `rake db:setup`.
 
-# These two methods would create these objects on demand
-# later anyway, but it's better form to create them up front.
-include CurrentApiClient
-system_user
-system_group
-anonymous_group
-anonymous_user
-empty_collection
+DatabaseSeeds.install

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list