diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs index 07ca4ab8..140af833 100644 --- a/src/api2/config/datastore.rs +++ b/src/api2/config/datastore.rs @@ -11,7 +11,7 @@ use crate::api2::types::*; use crate::backup::*; use crate::config::cached_user_info::CachedUserInfo; use crate::config::datastore::{self, DataStoreConfig, DIR_NAME_SCHEMA}; -use crate::config::acl::{PRIV_DATASTORE_AUDIT, PRIV_DATASTORE_MODIFY}; +use crate::config::acl::{PRIV_DATASTORE_ALLOCATE, PRIV_DATASTORE_AUDIT, PRIV_DATASTORE_MODIFY}; #[api( input: { @@ -106,7 +106,7 @@ pub fn list_datastores( }, }, access: { - permission: &Permission::Privilege(&["datastore"], PRIV_DATASTORE_MODIFY, false), + permission: &Permission::Privilege(&["datastore"], PRIV_DATASTORE_ALLOCATE, false), }, )] /// Create new datastore config. diff --git a/src/config/acl.rs b/src/config/acl.rs index 67f61976..39f9d030 100644 --- a/src/config/acl.rs +++ b/src/config/acl.rs @@ -27,6 +27,7 @@ constnamedbitmap! { PRIV_SYS_POWER_MANAGEMENT("Sys.PowerManagement"); PRIV_DATASTORE_AUDIT("Datastore.Audit"); + PRIV_DATASTORE_ALLOCATE("Datastore.Allocate"); PRIV_DATASTORE_MODIFY("Datastore.Modify"); PRIV_DATASTORE_READ("Datastore.Read");