perf: Pam account

pull/14793/head
feng 2025-01-10 16:19:07 +08:00 committed by feng626
parent 22aee54207
commit d8de79d3d7
1 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,14 @@ class PamDashboardApi(APIView):
data['total_long_time_change_password_accounts'] = Account.get_risks(
risk_type=RiskChoice.long_time_password).count()
if _all or query_params.get('total_leaked_password_accounts'):
data['total_leaked_password_accounts'] = Account.get_risks(
risk_type=RiskChoice.leaked_password).count()
if _all or query_params.get('total_repeated_password_accounts'):
data['total_repeated_password_accounts'] = Account.get_risks(
risk_type=RiskChoice.repeated_password).count()
if _all or query_params.get('total_count_type_to_accounts'):
data.update({
'total_count_type_to_accounts': self.get_type_to_accounts(),