From aea616987b3492ac587f28e34e948b67f7b2502d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 28 Oct 2021 15:00:54 +0200 Subject: [PATCH] sync: add group filtering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Dominik Csapak Signed-off-by: Thomas Lamprecht --- pbs-api-types/src/jobs.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs index ec7b0843..419bdaf7 100644 --- a/pbs-api-types/src/jobs.rs +++ b/pbs-api-types/src/jobs.rs @@ -403,6 +403,10 @@ pub const GROUP_FILTER_LIST_SCHEMA: Schema = ArraySchema::new("List of group fil optional: true, schema: SYNC_SCHEDULE_SCHEMA, }, + groups: { + schema: GROUP_FILTER_LIST_SCHEMA, + optional: true, + }, } )] #[derive(Serialize,Deserialize,Clone,Updater)] @@ -422,6 +426,8 @@ pub struct SyncJobConfig { pub comment: Option, #[serde(skip_serializing_if="Option::is_none")] pub schedule: Option, + #[serde(skip_serializing_if="Option::is_none")] + pub groups: Option>, } #[api(