Skip to content

Commit

Permalink
perf: Pam account
Browse files Browse the repository at this point in the history
  • Loading branch information
feng626 committed Jan 10, 2025
1 parent 22aee54 commit d8de79d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/accounts/api/account/pam_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ def get(self, request, *args, **kwargs):
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(),
Expand Down

0 comments on commit d8de79d

Please sign in to comment.