src/config/acl.rs: rtename PRTIV_DATASTORE_ALLOCATE to PRIV_DATASTORE_MODIFY
This commit is contained in:
parent
14627d671a
commit
9c7fe29dfc
@ -8,7 +8,7 @@ use proxmox::api::{api, ApiMethod, Router, RpcEnvironment, Permission};
|
|||||||
use crate::api2::types::*;
|
use crate::api2::types::*;
|
||||||
use crate::backup::*;
|
use crate::backup::*;
|
||||||
use crate::config::datastore;
|
use crate::config::datastore;
|
||||||
use crate::config::acl::{PRIV_DATASTORE_AUDIT, PRIV_DATASTORE_ALLOCATE};
|
use crate::config::acl::{PRIV_DATASTORE_AUDIT, PRIV_DATASTORE_MODIFY};
|
||||||
|
|
||||||
#[api(
|
#[api(
|
||||||
input: {
|
input: {
|
||||||
@ -66,7 +66,7 @@ pub fn list_datastores(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Privilege(&["datastore"], PRIV_DATASTORE_ALLOCATE, false),
|
permission: &Permission::Privilege(&["datastore"], PRIV_DATASTORE_MODIFY, false),
|
||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// Create new datastore config.
|
/// Create new datastore config.
|
||||||
@ -137,7 +137,7 @@ pub fn read_datastore(name: String) -> Result<Value, Error> {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_ALLOCATE, false),
|
permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_MODIFY, false),
|
||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// Update datastore config.
|
/// Update datastore config.
|
||||||
@ -189,7 +189,7 @@ pub fn update_datastore(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_ALLOCATE, false),
|
permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_MODIFY, false),
|
||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// Remove a datastore configuration.
|
/// Remove a datastore configuration.
|
||||||
|
@ -16,7 +16,7 @@ pub const PRIV_SYS_MODIFY: u64 = 1 << 1;
|
|||||||
pub const PRIV_SYS_POWER_MANAGEMENT: u64 = 1 << 2;
|
pub const PRIV_SYS_POWER_MANAGEMENT: u64 = 1 << 2;
|
||||||
|
|
||||||
pub const PRIV_DATASTORE_AUDIT: u64 = 1 << 3;
|
pub const PRIV_DATASTORE_AUDIT: u64 = 1 << 3;
|
||||||
pub const PRIV_DATASTORE_ALLOCATE: u64 = 1 << 4;
|
pub const PRIV_DATASTORE_MODIFY: u64 = 1 << 4;
|
||||||
pub const PRIV_DATASTORE_ALLOCATE_SPACE: u64 = 1 << 5;
|
pub const PRIV_DATASTORE_ALLOCATE_SPACE: u64 = 1 << 5;
|
||||||
|
|
||||||
pub const PRIV_PERMISSIONS_MODIFY: u64 = 1 << 6;
|
pub const PRIV_PERMISSIONS_MODIFY: u64 = 1 << 6;
|
||||||
@ -30,7 +30,7 @@ PRIV_DATASTORE_AUDIT;
|
|||||||
|
|
||||||
pub const ROLE_DATASTORE_ADMIN: u64 =
|
pub const ROLE_DATASTORE_ADMIN: u64 =
|
||||||
PRIV_DATASTORE_AUDIT |
|
PRIV_DATASTORE_AUDIT |
|
||||||
PRIV_DATASTORE_ALLOCATE |
|
PRIV_DATASTORE_MODIFY |
|
||||||
PRIV_DATASTORE_ALLOCATE_SPACE;
|
PRIV_DATASTORE_ALLOCATE_SPACE;
|
||||||
|
|
||||||
pub const ROLE_DATASTORE_USER: u64 =
|
pub const ROLE_DATASTORE_USER: u64 =
|
||||||
|
Loading…
Reference in New Issue
Block a user