forked from MarseyWorld/MarseyWorld
don't whitelist fagmins
parent
1bce1c273f
commit
4a98c2a639
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue