[ARVADOS] updated: 1.3.0-1568-g9902ba33a

Git user git at public.curoverse.com
Thu Sep 5 15:24:38 UTC 2019


Summary of changes:
 ...ctions.rb => 20190905151603_enforce_unique_identity_url.rb} |  4 ++--
 services/api/db/structure.sql                                  | 10 +++++++++-
 services/api/test/integration/remote_user_test.rb              |  1 -
 3 files changed, 11 insertions(+), 4 deletions(-)
 copy services/api/db/migrate/{20130107181109_add_uuid_to_collections.rb => 20190905151603_enforce_unique_identity_url.rb} (50%)

       via  9902ba33a4006d8652e675f76b6d7e43a2446d14 (commit)
      from  d6c4fc82452b6c8e7fe492a0e2a163a19477f95a (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 9902ba33a4006d8652e675f76b6d7e43a2446d14
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Sep 5 11:19:58 2019 -0400

    15558: Enforce uniqueness on identity_url
    
    Exactly one user record can have a given identity_url.  This is
    already the case in practice, now it is enforced.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/api/db/migrate/20190905151603_enforce_unique_identity_url.rb b/services/api/db/migrate/20190905151603_enforce_unique_identity_url.rb
new file mode 100644
index 000000000..784b2ff3e
--- /dev/null
+++ b/services/api/db/migrate/20190905151603_enforce_unique_identity_url.rb
@@ -0,0 +1,9 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+class EnforceUniqueIdentityUrl < ActiveRecord::Migration[5.0]
+  def change
+    add_index :users, [:identity_url], :unique => true
+  end
+end
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 889ffa748..88cd0baa2 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -2521,6 +2521,13 @@ CREATE INDEX index_users_on_created_at ON public.users USING btree (created_at);
 
 
 --
+-- Name: index_users_on_identity_url; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE UNIQUE INDEX index_users_on_identity_url ON public.users USING btree (identity_url);
+
+
+--
 -- Name: index_users_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
@@ -3016,6 +3023,7 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('20190422144631'),
 ('20190523180148'),
 ('20190808145904'),
-('20190809135453');
+('20190809135453'),
+('20190905151603');
 
 
diff --git a/services/api/test/integration/remote_user_test.rb b/services/api/test/integration/remote_user_test.rb
index 81ea9623e..c388ac0bf 100644
--- a/services/api/test/integration/remote_user_test.rb
+++ b/services/api/test/integration/remote_user_test.rb
@@ -294,7 +294,6 @@ class RemoteUsersTest < ActionDispatch::IntegrationTest
       params: {format: 'json'},
       headers: auth(remote: 'zbbbb')
     assert_response :success
-    puts json_response
     assert_equal 'zbbbb-tpzed-000000000001234', json_response['uuid']
     assert_equal false, json_response['is_admin']
     assert_equal true, json_response['is_active']

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list