~comcloudway/builds.sr.ht

b4e1b912ce881b3131061e8cccf8cb7a262390cd — Conrad Hoffmann 11 months ago c2bdab5
Only allow resubmission of accessible jobs
1 files changed, 2 insertions(+), 0 deletions(-)

M buildsrht/blueprints/jobs.py
M buildsrht/blueprints/jobs.py => buildsrht/blueprints/jobs.py +2 -0
@@ 242,6 242,8 @@ def resubmit_GET(job_id):
    job = Job.query.filter(Job.id == job_id).one_or_none()
    if not job:
        abort(404)
    if not get_access(job):
        abort(404)
    session["manifest"] = job.manifest
    if isinstance(job.note, str) and len(job.note.splitlines()) == 1:
        note = addsuffix(job.note, "(resubmitted)")