mirror of
https://git.proxmox.com/git/proxmox-perl-rs
synced 2025-08-13 18:27:06 +00:00
notify: add wrapper for get_referenced_entities
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.wagner@proxmox.com>
This commit is contained in:
parent
de59ffe4ec
commit
69d2eb953d
@ -548,4 +548,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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user