X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7af0535d3b0d7960152b06b7211c26bfd7b208cb..9f487917d8c2aa3958473dd1c11dc584485c1229:/services/api/lib/tasks/manage_long_lived_tokens.rake?ds=sidebyside diff --git a/services/api/lib/tasks/manage_long_lived_tokens.rake b/services/api/lib/tasks/manage_long_lived_tokens.rake index d83c2b6030..70a0f24284 100644 --- a/services/api/lib/tasks/manage_long_lived_tokens.rake +++ b/services/api/lib/tasks/manage_long_lived_tokens.rake @@ -29,9 +29,9 @@ 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) + auth.update!(expires_at: exp_date) end token_count += 1 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