From 31d011df08c0a3d208ea60e0cc8615d862f8b1ae Mon Sep 17 00:00:00 2001 From: Geoff Wilson Date: Wed, 27 Nov 2024 11:45:39 -0500 Subject: [PATCH] redundant advisory lock (already locking in private method) --- app/lib/clients/vault/policy.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/lib/clients/vault/policy.rb b/app/lib/clients/vault/policy.rb index 64ca5c9..67ceade 100644 --- a/app/lib/clients/vault/policy.rb +++ b/app/lib/clients/vault/policy.rb @@ -13,18 +13,14 @@ def rotate_token def assign_entity_policy(identity, policy_name) sub = identity.sub email = identity.email - Domain.with_advisory_lock(sub) do - put_entity(sub, [ policy_name ]) - put_entity_alias(sub, email, "oidc") - end + put_entity(sub, [ policy_name ]) + put_entity_alias(sub, email, "oidc") end def assign_groups_policy(groups, policy_name) groups.each do |group| - Domain.with_advisory_lock(group) do - put_group(group, [ policy_name ]) - put_group_alias(group, group, "oidc") - end + put_group(group, [ policy_name ]) + put_group_alias(group, group, "oidc") end end