sync job: fix worker ID parsing

the namespace is optional, but should be captured to allow ACL checks
for unprivileged non-job-owners.

also add FIXME for other job types and workers that (might) need
updating.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2022-05-24 11:03:57 +02:00
committed by Thomas Lamprecht
parent 9f8aa8c5e2
commit b9b2d635fe
7 changed files with 7 additions and 1 deletions

View File

@ -115,6 +115,7 @@ pub fn do_prune_job(
let worker_type = job.jobtype().to_string();
let auth_id = auth_id.clone();
// TODO include namespace info here once this becomes namespace-aware/configurable
let worker_id = format!("{store}");
let upid_str = WorkerTask::new_thread(
&worker_type,

View File

@ -25,6 +25,7 @@ pub fn do_verification_job(
let (email, notify) = crate::server::lookup_datastore_notify_settings(&verification_job.store);
// FIXME encode namespace here for filter/ACL check?
let job_id = format!("{}:{}", &verification_job.store, job.jobname());
let worker_type = job.jobtype().to_string();
let upid_str = WorkerTask::new_thread(