diff options
Diffstat (limited to 'uploader/parse.py')
-rw-r--r-- | uploader/parse.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/uploader/parse.py b/uploader/parse.py index 865dae2..dea4f95 100644 --- a/uploader/parse.py +++ b/uploader/parse.py @@ -11,6 +11,7 @@ from quality_control.errors import InvalidValue, DuplicateHeading from uploader import jobs from uploader.dbinsert import species_by_id from uploader.db_utils import with_db_connection +from uploader.authorisation import require_login parsebp = Blueprint("parse", __name__) @@ -23,6 +24,7 @@ def isduplicateheading(item): return isinstance(item, DuplicateHeading) @parsebp.route("/parse", methods=["GET"]) +@require_login def parse(): """Trigger file parsing""" errors = False @@ -160,6 +162,7 @@ def fail(job_id: str): return render_template("no_such_job.html", job_id=job_id) @parsebp.route("/abort", methods=["POST"]) +@require_login def abort(): """Handle user request to abort file processing""" job_id = request.form["job_id"] |