mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 14:43:32 +08: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):
|
||||
@wraps(f)
|
||||
def wrap(*args, **kwargs):
|
||||
# Reset sudo mode in every 20s under dev mode
|
||||
SUDO_GAP = 900 if not DEBUG else 20
|
||||
# Reset sudo mode in every 60s under dev mode
|
||||
# SUDO_GAP = 900 if not DEBUG else 60
|
||||
SUDO_GAP = 900
|
||||
if (
|
||||
"sudo_time" not in session
|
||||
or (time() - int(session["sudo_time"])) > SUDO_GAP
|
||||
|
|
Loading…
Reference in a new issue