Aevann 2022-12-23 03:36:20 +02:00
parent 9979efbf7a
commit 853e986624
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ def admin_level_required(x):
def wrapper(*args, **kwargs):
v = get_logged_in_user()
if not v: abort(401)
if not IS_LOCALHOST and not v.mfa_secret:
if x and not IS_LOCALHOST and not v.mfa_secret:
abort(403, "You need to enable 2FA to use admin features!")
if v.admin_level < x: abort(403)
return make_response(f(*args, v=v, **kwargs))