Feat/change user email freezes limit (#22900)

This commit is contained in:
zyssyz123 2025-07-24 15:36:53 +08:00 committed by GitHub
commit 6ac06486e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 3 deletions

View file

@ -671,6 +671,12 @@ class AccountService:
return account
@classmethod
def is_account_in_freeze(cls, email: str) -> bool:
if dify_config.BILLING_ENABLED and BillingService.is_email_in_freeze(email):
return True
return False
@staticmethod
@redis_fallback(default_return=None)
def add_login_error_rate_limit(email: str) -> None: