Don't check slug candidate in public mode

This commit is contained in:
Miguel Jacq 2018-09-15 11:36:34 +10:00
parent b0d2183a3e
commit 6586cf6df9

View file

@ -143,6 +143,7 @@ class Web(object):
"""
@self.app.route("/<slug_candidate>")
def index(slug_candidate):
if not self.common.settings.get('public_mode'):
self.check_slug_candidate(slug_candidate)
return index_logic()
@ -186,6 +187,7 @@ class Web(object):
@self.app.route("/<slug_candidate>/download")
def download(slug_candidate):
if not self.common.settings.get('public_mode'):
self.check_slug_candidate(slug_candidate)
return download_logic()
@ -329,6 +331,7 @@ class Web(object):
@self.app.route("/<slug_candidate>")
def index(slug_candidate):
if not self.common.settings.get('public_mode'):
self.check_slug_candidate(slug_candidate)
return index_logic()
@ -427,6 +430,7 @@ class Web(object):
@self.app.route("/<slug_candidate>/upload", methods=['POST'])
def upload(slug_candidate):
if not self.common.settings.get('public_mode'):
self.check_slug_candidate(slug_candidate)
return upload_logic(slug_candidate)
@ -448,6 +452,7 @@ class Web(object):
@self.app.route("/<slug_candidate>/close", methods=['POST'])
def close(slug_candidate):
if not self.common.settings.get('public_mode'):
self.check_slug_candidate(slug_candidate)
return close_logic(slug_candidate)