api: datastore: require allocate privilege for deletion

makes only sense if we allow addition of a datastore also just with
that privilege

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-10-08 09:16:02 +02:00 committed by Dietmar Maurer
parent 41bfd24919
commit 92dd02aaf6

View File

@ -375,7 +375,7 @@ pub fn update_datastore(
},
},
access: {
permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_MODIFY, false),
permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_ALLOCATE, false),
},
)]
/// Remove a datastore configuration.