api: namespace management endpoints

allow to list any namespace with privileges on it and allow to create
and delete namespaces if the user has modify permissions on the parent
namespace.

Creation is only allowed if the parent NS already exists.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2022-04-24 20:24:42 +02:00
parent 15a9272495
commit 18934ae56b
5 changed files with 212 additions and 0 deletions

View File

@ -85,6 +85,9 @@ pub fn check_acl_path(path: &str) -> Result<(), Error> {
if components_len <= 2 {
return Ok(());
}
if components_len > 2 && components_len <= 2 + pbs_api_types::MAX_NAMESPACE_DEPTH {
return Ok(());
}
}
"remote" => {
// /remote/{remote}/{store}