builds.sr.ht: fix /api/.../manifest for logged out user

This commit is contained in:
Drew DeVault 2023-12-09 10:36:38 +01:00
parent b48cc91c05
commit 63cbb67271
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ def jobs_by_id_manifest_GET(job_id):
job = Job.query.filter(Job.id == job_id).first()
if not job:
abort(404)
if job.visibility == Visibility.PRIVATE and job.owner_id != current_token.user_id:
if job.visibility == Visibility.PRIVATE and (current_user is None or job.owner_id != current_token.user_id):
abort(404) # TODO: ACLs
return Response(job.manifest, content_type="text/plain")