[ARVADOS] updated: 611a3323ea110671c5fa021e14f93b24e4a6d7b7

git at public.curoverse.com git at public.curoverse.com
Wed Nov 5 10:21:43 EST 2014


Summary of changes:
 .../app/assets/javascripts/application.js          |   4 +
 .../app/assets/javascripts/infinite_scroll.js      |  75 +++++
 .../app/assets/stylesheets/application.css.scss    |   4 +
 .../app/controllers/application_controller.rb      |  22 +-
 apps/workbench/app/controllers/jobs_controller.rb  |  20 +-
 .../controllers/pipeline_instances_controller.rb   |  73 +++--
 .../app/controllers/projects_controller.rb         |   4 +-
 apps/workbench/app/helpers/provenance_helper.rb    | 305 ++++++++++-----------
 apps/workbench/app/models/arvados_api_client.rb    |   2 +-
 .../views/projects/_show_data_collections.html.erb |   3 +-
 .../projects/_show_jobs_and_pipelines.html.erb     |   5 +-
 .../views/projects/_show_other_objects.html.erb    |   3 +-
 .../projects/_show_pipeline_templates.html.erb     |   3 +-
 .../app/views/projects/_show_subprojects.html.erb  |   3 +-
 .../app/views/projects/_show_tab_contents.html.erb |  17 +-
 .../controllers/collections_controller_test.rb     |  69 +++++
 .../pipeline_instances_controller_test.rb          | 169 ++++++++++++
 .../test/integration/pipeline_instances_test.rb    |   6 +-
 apps/workbench/test/integration/projects_test.rb   | 204 +++++++-------
 apps/workbench/test/test_helper.rb                 |  15 +
 docker/api/application.yml.in                      |   2 +
 sdk/cli/bin/arv                                    |   4 +-
 sdk/cli/bin/arv-tag                                |   4 +-
 sdk/python/arvados/collection.py                   | 208 ++++++++------
 sdk/python/arvados/commands/put.py                 |  49 ++--
 sdk/python/arvados/config.py                       |   2 +-
 sdk/python/arvados/keep.py                         |   2 +-
 sdk/python/arvados/stream.py                       |   4 +-
 sdk/python/arvados/util.py                         |  29 +-
 sdk/python/bin/arv-get                             |   2 +
 sdk/python/bin/arv-normalize                       |   1 +
 sdk/python/tests/run_test_server.py                |   8 +-
 sdk/python/tests/test_collections.py               | 162 ++++++++---
 sdk/ruby/lib/arvados.rb                            |   2 +-
 sdk/ruby/lib/arvados/keep.rb                       |   1 +
 sdk/ruby/test/test_keep_manifest.rb                |  22 +-
 .../arvados/v1/collections_controller.rb           |  53 +++-
 .../controllers/arvados/v1/groups_controller.rb    |  14 +-
 services/api/app/models/user.rb                    |   6 +-
 services/api/config/application.default.yml        |   4 +
 services/api/lib/load_param.rb                     |  16 +-
 services/api/test/fixtures/collections.yml         |  21 ++
 services/api/test/fixtures/jobs.yml                |  36 +++
 services/api/test/fixtures/pipeline_instances.yml  |  12 +-
 .../arvados/v1/groups_controller_test.rb           |  32 +++
 services/api/test/unit/user_test.rb                |  34 +++
 services/fuse/arvados_fuse/__init__.py             |   1 +
 services/fuse/setup.py                             |   2 +-
 48 files changed, 1252 insertions(+), 487 deletions(-)
 create mode 100644 apps/workbench/test/controllers/collections_controller_test.rb

       via  611a3323ea110671c5fa021e14f93b24e4a6d7b7 (commit)
       via  18e63e25f167b25ccebbcb7eb2953c6e5d805fbb (commit)
       via  d5cf000ee76060ce5e96bb4032f54e7f6b19116e (commit)
       via  cbb6e930023aeffdd03332894c85bc156316c72f (commit)
       via  d65b1921a9aeffd6906b95aa927a07a48f013b32 (commit)
       via  c54353188145d882218997a4d746c8b091a070e7 (commit)
       via  94e9d86f85c808e905269cde830341823b1c614b (commit)
       via  e0a85f879dfa5ffcb2713e10b62ae49662c10878 (commit)
       via  850bc55e74beb1d444bf518ce0be9cb0eacaa158 (commit)
       via  db2411a5e8b0dab503a4f712e14c65ef33947a62 (commit)
       via  963f0bf8fc030052aea9a7fcd89ca6ef88967c96 (commit)
       via  f05771f1bbaa93afbda43820af483727f4a2df3a (commit)
       via  68dae835a2f8bebd5664211a60fc76d50e5ecc23 (commit)
       via  3e5e8972f4216a90b5bd17dff4a1c5f22106f820 (commit)
       via  a70e6990cd6903cd30b1c54b7454fffc1848e63c (commit)
       via  b798b325087c82578b4b079df968ad844a93dfb3 (commit)
       via  b7ec383316ca68220f9f54fe1602766284854173 (commit)
       via  5dd7bd8a05d52838b1cb8df7b341a843abae7a0a (commit)
       via  15dbb3110b3b7cc6712e58bdfbb9a5df7fab1882 (commit)
       via  411305d88273e22f286a127d43b88cc33681d9ff (commit)
       via  47c349ca374356163d15e59deb917a4d22f88206 (commit)
       via  3978e8ae9c1b5bbc07c63fd062e189a81e52399c (commit)
       via  ab3b9556865e694a4c33ed623cf2e55fc410f10f (commit)
       via  3b408ec4031c84549383db1ca99364e4c53a29fd (commit)
       via  6c7e0599e34d037c0e280b7622969488fb8f8b2e (commit)
       via  ae96829cc088d18c7aaf438eacb75830c7a40662 (commit)
       via  a6606b79fb6496e43eef6b2e8b04d5c1061f5635 (commit)
       via  4498d81399482be11a00e5e2223ef08d0576ef06 (commit)
       via  28053f8adcf1c36ba0a8cdf9c0b348765e68591a (commit)
       via  2a482395964360260020bf70e7645b08b106b1f1 (commit)
       via  ce2362b3b62ccb8fe2e5db5a2b87e9a6212ed86b (commit)
       via  55a0e060233385a9be029d0e75c152307950e268 (commit)
       via  83acfa97bdd34983d284b199e0c67a411aa7580e (commit)
       via  017587d701e08b38d9468dce45e121a69ecd8135 (commit)
       via  f9328bf507490f48e57b196be1de55d946644dea (commit)
       via  7505be2bb39b0a96304c46e89cd5392c8c037215 (commit)
       via  fad871168f4500959d48eac695336e49a92535b7 (commit)
       via  3f9d8b5ca7288921a62f5cbc6c59d64c4fd16707 (commit)
       via  9fa70c844ccc36a8c9543a8fafd2b56388c7a957 (commit)
       via  4d195ee9ed6a0d05dbdc31c40b6e899a49cb77ec (commit)
       via  b28531cd8051a2c9ae794ac2d3a2b7140e357407 (commit)
       via  e3e54264e8bc767e1ec773cff4e5bdf4c4934a36 (commit)
       via  0e8d9b4c01c08f0efbccd91497177fc102aa5c25 (commit)
       via  c10b68e95cd648caade631ca9bdeceba8e707384 (commit)
       via  9f37a732c9bfb3892231765f37e213af4e037e68 (commit)
       via  9ad6d61c1576b604b936eb981683941078d79d8e (commit)
       via  c4aefe62bd09b771c6e1cef7130645819af72cac (commit)
       via  4d257edde88edfb9530afa0d8b0ba7c9216cfb3a (commit)
       via  d0e60c70302c1b7ec84110cad0545924605c95bb (commit)
       via  2b6948ff7e11cd236ea26562ed76a534dcf3c0be (commit)
       via  8323e56e9dafb1bd4aee4f548c26854ea3eb05e9 (commit)
       via  112d6ce9132ea6749aef115e3787483958e858fd (commit)
       via  d9e2eb19dfef24c8b6af396b2b61b2dab4cf740d (commit)
       via  6817b34daf51030fd25459d349a940ff59eee690 (commit)
       via  6d23c29612aedb12e35930cf37a9c3b36839359b (commit)
       via  47853db92d6e1b9eca4beddf471189ee9f4e0217 (commit)
       via  6bfa13079feb0cd6632dcf83dd6e1dc1d99d8cdf (commit)
       via  37b765276dbde3d50f403d269288929d3b211564 (commit)
       via  6ad6190f242a657e6df08014ad3abf4254bfda9b (commit)
       via  fd1613bf6ad5af029255959ecf86f313b08d03ee (commit)
       via  f7a0b41371ca4448d6c0e912cc5fede1869ba265 (commit)
       via  c5f31bd6f1484dc1d09ec404e201f69294f84a5b (commit)
       via  66c13b6055a363cb08197b8c5d040ed9a511c8ca (commit)
       via  4e624965e369180dfb971bf3a53ae2b4d726f271 (commit)
       via  70609f51a1124be1704f4a61aad9a597c961c0e8 (commit)
       via  b82eca689e7374cdafbb3435c4168579850649ac (commit)
       via  3103c676533ec17bed96cf38a264a2415534499a (commit)
       via  0c6b79271aa6cc8cf4f3b125a9d7a7f5645b027b (commit)
      from  c5c8c8836cf769843e90bb90b8851f151d61b326 (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 611a3323ea110671c5fa021e14f93b24e4a6d7b7
Merge: 18e63e2 d5cf000
Author: Ward Vandewege <ward at curoverse.com>
Date:   Wed Nov 5 10:21:24 2014 -0500

    Merge branch 'master' into 4383-easy-install
    
    Conflicts:
    	docker/api/application.yml.in
    
    refs #4383


commit 18e63e25f167b25ccebbcb7eb2953c6e5d805fbb
Author: Ward Vandewege <ward at curoverse.com>
Date:   Wed Nov 5 10:18:31 2014 -0500

    Add unit tests for new auto_admin_first_user configuration setting.
    
    refs #4383

diff --git a/services/api/test/unit/user_test.rb b/services/api/test/unit/user_test.rb
index 3d8ed34..29ba3e4 100644
--- a/services/api/test/unit/user_test.rb
+++ b/services/api/test/unit/user_test.rb
@@ -9,6 +9,40 @@ class UserTest < ActiveSupport::TestCase
     system_user
   end
 
+  test "create_new_user_auto_admin_first_user" do
+    # This test requires no admin users exist (except for the system user)
+    users(:admin).delete
+
+    @all_users = User.where("uuid not like '%-000000000000000'").where(:is_admin => true).find(:all)
+
+    assert_equal 0, @all_users.size, "No admin users should exist (except for the system user)"
+
+    Rails.configuration.auto_admin_first_user = true
+
+    assert_equal true, Rails.configuration.auto_admin_first_user
+    user = User.new
+    user.first_name = "first_name_for_newly_created_admin_user"
+
+    act_as_system_user do
+      user.save!
+    end
+
+    user = User.find(user.id)   # get the user back
+    assert user.is_admin, 'is_admin should be set for first new user'
+    assert_equal 'first_name_for_newly_created_admin_user', user.first_name
+
+    user = User.new
+    user.first_name = "first_name_for_newly_created_ordinary_user"
+
+    act_as_system_user do
+      user.save!
+    end
+
+    user = User.find(user.id)   # get the user back
+    assert !user.is_admin, 'is_admin should not be set for second new user'
+    assert_equal 'first_name_for_newly_created_ordinary_user', user.first_name
+  end
+
   test "check non-admin active user properties" do
     @active_user = users(:active)     # get the active user
     assert !@active_user.is_admin, 'is_admin should not be set for a non-admin user'

commit f05771f1bbaa93afbda43820af483727f4a2df3a
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Nov 3 17:32:28 2014 -0500

    When auto_admin_first_user is set to true (default false), the first
    user to sign in on a new installation will be an admin.
    
    refs #4383

diff --git a/docker/api/application.yml.in b/docker/api/application.yml.in
index 4cd374d..7f41985 100644
--- a/docker/api/application.yml.in
+++ b/docker/api/application.yml.in
@@ -60,6 +60,8 @@ production:
 
   auto_setup_new_users: true
 
+  auto_admin_first_user: true
+
 test:
   uuid_prefix: zzzzz
   secret_token: <%= rand(2**512).to_s(36) %>
diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb
index e48693b..3b201b5 100644
--- a/services/api/app/models/user.rb
+++ b/services/api/app/models/user.rb
@@ -234,8 +234,10 @@ class User < ArvadosModel
   end
 
   def check_auto_admin
-    if User.where("uuid not like '%-000000000000000'").where(:is_admin => true).count == 0 and Rails.configuration.auto_admin_user
-      if self.email == Rails.configuration.auto_admin_user
+    if not self.uuid.end_with?('anonymouspublic') and
+       User.where("uuid not like '%-000000000000000'").where(:is_admin => true).count == 0
+      if (Rails.configuration.auto_admin_user and self.email == Rails.configuration.auto_admin_user) or
+         Rails.configuration.auto_admin_first_user
         self.is_admin = true
         self.is_active = true
       end
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index 6c77f26..92b3ca1 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -133,6 +133,10 @@ common:
   # should be an address associated with a Google account.
   auto_admin_user: false
 
+  # If auto_admin_first_user is set to true, the first user to log in when no
+  # other admin users exist will automatically become an admin user.
+  auto_admin_first_user: false
+
   ## Set Time.zone default to the specified zone and make Active
   ## Record auto-convert to this zone.  Run "rake -D time" for a list
   ## of tasks for finding time zone names. Default is UTC.

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list