Skip to content

Commit

Permalink
etc: change lastActivityDescription strings for service accounts
Browse files Browse the repository at this point in the history
Signed-off-by: kangwork <[email protected]>
  • Loading branch information
kangwork committed Aug 9, 2024
1 parent 5ea93b9 commit 666d25e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugin/manager/iam/service_account_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def make_cloud_service_info(self, service_account: dict, project_id: str) -> dic
self.logging_connector.get_last_log_entry_timestamp(project_id, email)
)
service_account["lastActivityDescription"] = (
f"Activity log found in the last {self.logging_connector.log_search_period}"
f"Activity log found in the past {self.logging_connector.log_search_period.lower()}"
if service_account["lastActivityTime"]
else f"No activity log found in the last {self.logging_connector.log_search_period}"
else f"No activity log found in the past {self.logging_connector.log_search_period.lower()}"
)
keys = self.get_service_account_keys(email, project_id)
service_account["keys"] = keys
Expand Down Expand Up @@ -106,9 +106,9 @@ def get_service_account_keys(self, email: str, project_id: str) -> list:
)
)
key["lastActivityDescription"] = (
f"Activity log found in the last {self.logging_connector.log_search_period}"
f"Activity log found in the past {self.logging_connector.log_search_period.lower()}"
if key["lastActivityTime"]
else f"No activity log found in the last {self.logging_connector.log_search_period}"
else f"No activity log found in the past {self.logging_connector.log_search_period.lower()}"
)

creation_time = key.get("validAfterTime")
Expand Down

0 comments on commit 666d25e

Please sign in to comment.