[ARVADOS] created: 2.1.0-1513-g3c3cae35f

Git user git at public.arvados.org
Thu Oct 21 20:17:01 UTC 2021


        at  3c3cae35fe5b3cf0371e1cbb1ff295baf555f77a (commit)


commit 3c3cae35fe5b3cf0371e1cbb1ff295baf555f77a
Author: Ward Vandewege <ward at curii.com>
Date:   Thu Oct 21 16:16:04 2021 -0400

    18288: when running the db:check_long_lived_tokens and
           db:fix_long_lived_tokens rake tasks, do not expire the
           anonymouspublic token.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/services/api/lib/tasks/manage_long_lived_tokens.rake b/services/api/lib/tasks/manage_long_lived_tokens.rake
index d83c2b603..7a665ff7e 100644
--- a/services/api/lib/tasks/manage_long_lived_tokens.rake
+++ b/services/api/lib/tasks/manage_long_lived_tokens.rake
@@ -29,7 +29,7 @@ namespace :db do
         # skip this token
         next
       end
-      if (auth.user.uuid =~ /-tpzed-000000000000000/).nil?
+      if (auth.user.uuid =~ /-tpzed-000000000000000/).nil? and (auth.user.uuid =~ /-tpzed-anonymouspublic/).nil?
         CurrentApiClientHelper.act_as_system_user do
           auth.update_attributes!(expires_at: exp_date)
         end
@@ -58,7 +58,7 @@ namespace :db do
         # skip this token
         next
       end
-      if not auth.user.nil? and (auth.user.uuid =~ /-tpzed-000000000000000/).nil?
+      if not auth.user.nil? and (auth.user.uuid =~ /-tpzed-000000000000000/).nil? and (auth.user.uuid =~ /-tpzed-anonymouspublic/).nil?
         user_ids.add(auth.user_id)
         token_count += 1
       end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list