The function returns all other entities referenced by a filter/target. This is useful for permission checks, where the user must have the appropriate permissions for all entities.
Signed-off-by: Lukas Wagner <l.wag...@proxmox.com> --- pve-rs/src/notify.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs index 0c00b03..d34ec85 100644 --- a/pve-rs/src/notify.rs +++ b/pve-rs/src/notify.rs @@ -543,4 +543,13 @@ mod export { let mut config = this.config.lock().unwrap(); api::filter::delete_filter(&mut config, name) } + + #[export] + fn get_referenced_entities( + #[try_from_ref] this: &NotificationConfig, + name: &str, + ) -> Result<Vec<String>, ApiError> { + let config = this.config.lock().unwrap(); + api::common::get_referenced_entities(&config, name) + } } -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel