MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / current_user

Function current_user

Scripts/ButSystem.py:1722–1732  ·  view source on GitHub ↗

current_user. Internal helper function. This docstring was added automatically to improve maintainability. Returns: Varies.

()

Source from the content-addressed store, hash-verified

1720 u = _trusted_device_lookup(fp, tok)
1721 if not u:
1722 return None
1723 # Do not auto-login when 2FA is enabled.
1724 if user_2fa_enabled(u):
1725 return None
1726 # Scope capacity check (match normal login)
1727 try:
1728 is_admin_u = bool(is_admin(u))
1729 sc = current_scope()
1730 if not scope_capacity_ok(u, is_admin_u, sc):
1731 return None
1732 except Exception:
1733 pass
1734
1735 session["u"] = u

Callers 15

is_logged_inFunction · 0.70
wrapperFunction · 0.70
privacy_panicFunction · 0.70
privacy_resumeFunction · 0.70
require_adminFunction · 0.70
inject_ctxFunction · 0.70
loadingFunction · 0.70
api_bootstrapFunction · 0.70
profileFunction · 0.70
profile_saveFunction · 0.70
settings_securityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected