[ARVADOS] updated: 1.3.0-2-g5090fa089

Git user git at public.curoverse.com
Tue Dec 4 11:17:45 EST 2018


Summary of changes:
 services/api/app/models/arvados_model.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

       via  5090fa0891aa67f8373831a2c87ba69b65078b0d (commit)
      from  f8ea35a26789594253cff761dce87dd51ff9e89c (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 5090fa0891aa67f8373831a2c87ba69b65078b0d
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Dec 4 11:17:12 2018 -0500

    14576: Use the 'in' test for user queries
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index 30c4c486e..93d5b9a02 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -293,14 +293,14 @@ class ArvadosModel < ActiveRecord::Base
       # see issue 13208 for details.
 
       # Match a direct read permission link from the user to the record uuid
-      direct_check = "EXISTS(SELECT 1 FROM #{PERMISSION_VIEW} "+
-                     "WHERE user_uuid IN (:user_uuids) AND perm_level >= 1 #{trashed_check} AND target_uuid = #{sql_table}.uuid)"
+      direct_check = "#{sql_table}.uuid IN (SELECT target_uuid FROM #{PERMISSION_VIEW} "+
+                     "WHERE user_uuid IN (:user_uuids) AND perm_level >= 1 #{trashed_check})"
 
       # Match a read permission link from the user to the record's owner_uuid
       owner_check = ""
       if sql_table != "api_client_authorizations" and sql_table != "groups" then
-        owner_check = "OR EXISTS(SELECT 1 FROM #{PERMISSION_VIEW} "+
-          "WHERE user_uuid IN (:user_uuids) AND perm_level >= 1 #{trashed_check} AND target_uuid = #{sql_table}.owner_uuid AND target_owner_uuid IS NOT NULL) "
+        owner_check = "OR #{sql_table}.owner_uuid IN (SELECT target_uuid FROM #{PERMISSION_VIEW} "+
+          "WHERE user_uuid IN (:user_uuids) AND perm_level >= 1 #{trashed_check} AND target_owner_uuid IS NOT NULL) "
       end
 
       links_cond = ""

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list