mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-03 00:15:20 +00:00
perf: 统一应用树 (#6535)
* perf: 添加应用树api * perf: perms tree * perf: 统一应用树 * perf: 修改icon * perf: stash it * perf: 优化应用账号 * perf: 基本完成应用账号重构 * perf: 修改翻译 Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -112,6 +112,9 @@ class UserCanUpdateSSHKey(permissions.BasePermission):
|
||||
|
||||
class NeedMFAVerify(permissions.BasePermission):
|
||||
def has_permission(self, request, view):
|
||||
if not settings.SECURITY_VIEW_AUTH_NEED_MFA:
|
||||
return True
|
||||
|
||||
mfa_verify_time = request.session.get('MFA_VERIFY_TIME', 0)
|
||||
if time.time() - mfa_verify_time < settings.SECURITY_MFA_VERIFY_TTL:
|
||||
return True
|
||||
|
Reference in New Issue
Block a user