mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 17:08:30 +01:00
remove debug code for sudo
This commit is contained in:
parent
6509053fa8
commit
6ea17b4feb
1 changed files with 3 additions and 2 deletions
|
@ -45,8 +45,9 @@ def enter_sudo():
|
||||||
def sudo_required(f):
|
def sudo_required(f):
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrap(*args, **kwargs):
|
def wrap(*args, **kwargs):
|
||||||
# Reset sudo mode in every 20s under dev mode
|
# Reset sudo mode in every 60s under dev mode
|
||||||
SUDO_GAP = 900 if not DEBUG else 20
|
# SUDO_GAP = 900 if not DEBUG else 60
|
||||||
|
SUDO_GAP = 900
|
||||||
if (
|
if (
|
||||||
"sudo_time" not in session
|
"sudo_time" not in session
|
||||||
or (time() - int(session["sudo_time"])) > SUDO_GAP
|
or (time() - int(session["sudo_time"])) > SUDO_GAP
|
||||||
|
|
Loading…
Reference in a new issue