sync: add group filtering
like for manual pulls, but persisted in the sync job config and visible in the relevant GUI parts. GUI is read-only for now (and defaults to no filtering on creation), as this is a rather advanced feature that requires a complex GUI to be user-friendly (regex-freeform, type-combobox, remote group scanning + selector with additional freeform input). Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Reviewed-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
71e534631f
commit
5f83d3f636
@ -192,6 +192,8 @@ pub enum DeletableProperty {
|
||||
schedule,
|
||||
/// Delete the remove-vanished flag.
|
||||
remove_vanished,
|
||||
/// Delete the groups property.
|
||||
groups,
|
||||
}
|
||||
|
||||
#[api(
|
||||
@ -254,6 +256,7 @@ pub fn update_sync_job(
|
||||
DeletableProperty::comment => { data.comment = None; },
|
||||
DeletableProperty::schedule => { data.schedule = None; },
|
||||
DeletableProperty::remove_vanished => { data.remove_vanished = None; },
|
||||
DeletableProperty::groups => { data.groups = None; },
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -271,6 +274,7 @@ pub fn update_sync_job(
|
||||
if let Some(remote) = update.remote { data.remote = remote; }
|
||||
if let Some(remote_store) = update.remote_store { data.remote_store = remote_store; }
|
||||
if let Some(owner) = update.owner { data.owner = Some(owner); }
|
||||
if let Some(groups) = update.groups { data.groups = Some(groups); }
|
||||
|
||||
let schedule_changed = data.schedule != update.schedule;
|
||||
if update.schedule.is_some() { data.schedule = update.schedule; }
|
||||
@ -390,6 +394,7 @@ acl:1:/remote/remote1/remotestore1:write@pbs:RemoteSyncOperator
|
||||
owner: Some(write_auth_id.clone()),
|
||||
comment: None,
|
||||
remove_vanished: None,
|
||||
groups: None,
|
||||
schedule: None,
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ impl TryFrom<&SyncJobConfig> for PullParameters {
|
||||
&sync_job.remote_store,
|
||||
sync_job.owner.as_ref().unwrap_or_else(|| Authid::root_auth_id()).clone(),
|
||||
sync_job.remove_vanished,
|
||||
None,
|
||||
sync_job.groups.clone(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user