From 4833e4d66be64d4cd71fa2cd03cf0fab05e665d9 Mon Sep 17 00:00:00 2001 From: joshuaperakis Date: Fri, 5 Apr 2024 10:36:48 -0400 Subject: [PATCH] update class attribute --- scripts/pcs_rotate_service_account_access_key.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pcs_rotate_service_account_access_key.py b/scripts/pcs_rotate_service_account_access_key.py index 604b798..9ab811a 100644 --- a/scripts/pcs_rotate_service_account_access_key.py +++ b/scripts/pcs_rotate_service_account_access_key.py @@ -84,10 +84,10 @@ def get_current_version(access_key_name): # Safeguards. -if current_access_key['id'].lower() == pc_api.username.lower(): +if current_access_key['id'].lower() == pc_api.identity.lower(): pc_utility.error_and_exit(500, 'This script cannot rotate its own Access Key') -if previous_access_key and previous_access_key['id'].lower() == pc_api.username.lower(): +if previous_access_key and previous_access_key['id'].lower() == pc_api.identity.lower(): pc_utility.error_and_exit(500, 'This script cannot rotate its own Access Key') if current_access_key['username'].lower() == current_user['email'].lower():