test: deny a rerun of a run started invisible to its owner

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-11-13 17:36:10 +01:00
co-authored by Claude Opus 5.5
parent ad4ae440c0
commit 2e3e9fc2e5
+5
View File
@@ -644,6 +644,11 @@ async fn batch_rerun_denies_invisible_source_job(db: Pool<Postgres>) -> anyhow::
.await?;
let original = push_completed(&db, script_payload(), vec![("name", json!("secret"))]).await?;
// The grant shows the script's runs, except one started invisible to its owner.
sqlx::query("UPDATE v2_job SET visible_to_owner = false WHERE id = $1")
.bind(original)
.execute(&db)
.await?;
let results = batch_rerun(
&member,