mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-25 06:21:58 +00:00
perf: Login to change password and filter out useless accounts
This commit is contained in:
parent
79c2284a01
commit
939c7b214e
@ -110,6 +110,13 @@ class SessionSerializer(BulkOrgResourceModelSerializer):
|
|||||||
except Account.DoesNotExist:
|
except Account.DoesNotExist:
|
||||||
logger.warning(f"Account with id {account_id} does not exist for change secret task.")
|
logger.warning(f"Account with id {account_id} does not exist for change secret task.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not account.secret_reset or not account.is_active:
|
||||||
|
logger.warning(
|
||||||
|
f"Account secret reset is not enabled or account is inactive: account={account}"
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
acls = LoginAssetACL.filter_queryset(**kwargs)
|
acls = LoginAssetACL.filter_queryset(**kwargs)
|
||||||
acl = LoginAssetACL.get_match_rule_acls(user, instance.remote_addr, acls)
|
acl = LoginAssetACL.get_match_rule_acls(user, instance.remote_addr, acls)
|
||||||
if not acl:
|
if not acl:
|
||||||
|
Loading…
Reference in New Issue
Block a user