don't whitelist fagmins

master
Aevann1 2022-06-07 12:34:46 +02:00
parent 1bce1c273f
commit 4a98c2a639
1 changed files with 0 additions and 11 deletions

View File

@ -5,17 +5,6 @@ from files.__main__ import db_session, limiter
from random import randint
import user_agents
@limiter.request_filter
def limiter_whitelist_admins():
if not hasattr(g, 'agent') or not g.agent:
return False
if not hasattr(g, 'db') or not g.db:
return False
v = get_logged_in_user()
if not v:
return False
return v.admin_level >= 2
def get_logged_in_user():
if hasattr(g, 'v'): return g.v