api: namespace create: lookup datastore with corret operation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-16 18:26:55 +02:00
parent 6da6bafeac
commit ebab1e5ed9

View File

@ -63,7 +63,7 @@ pub fn create_namespace(
proxmox_router::http_bail!(FORBIDDEN, "permission check failed");
}
let datastore = DataStore::lookup_datastore(&store, Some(Operation::Read))?;
let datastore = DataStore::lookup_datastore(&store, Some(Operation::Write))?;
datastore.create_namespace(&parent, name)
}