code formatting fixups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-05 10:36:40 +02:00
parent e2aeff40eb
commit a40ffb92ac
2 changed files with 8 additions and 4 deletions

View File

@ -952,7 +952,11 @@ acl:1:/storage/store1:user1@pbs:DatastoreBackup
assert!(tree.any_privs_below(&user1, &["store"], ROLE_ADMIN)?); assert!(tree.any_privs_below(&user1, &["store"], ROLE_ADMIN)?);
// user2 has not privileges under "/store/store2/store3" --> return false // user2 has not privileges under "/store/store2/store3" --> return false
assert!(!tree.any_privs_below(&user2, &["store", "store2", "store3"], ROLE_DATASTORE_READER)?); assert!(!tree.any_privs_below(
&user2,
&["store", "store2", "store3"],
ROLE_DATASTORE_READER
)?);
// user2 has DatastoreReader privileges under "/store/store2/store31" --> return true // user2 has DatastoreReader privileges under "/store/store2/store31" --> return true
assert!(tree.any_privs_below(&user2, &["store/store2/store31"], ROLE_DATASTORE_READER)?); assert!(tree.any_privs_below(&user2, &["store/store2/store31"], ROLE_DATASTORE_READER)?);

View File

@ -297,8 +297,8 @@ pub const ROUTER: Router = Router::new().post(&API_METHOD_RESTORE);
}, },
access: { access: {
// Note: parameters are no uri parameter, so we need to test inside function body // Note: parameters are no uri parameter, so we need to test inside function body
description: "The user needs Tape.Read privilege on /tape/pool/{pool} \ description: "The user needs Tape.Read privilege on /tape/pool/{pool} and \
and /tape/drive/{drive}, Datastore.Backup privilege on /datastore/{store}/[{namespace}],\ /tape/drive/{drive}, Datastore.Backup privilege on /datastore/{store}/[{namespace}], \
Datastore.Modify privileges to create namespaces (if they don't exist).", Datastore.Modify privileges to create namespaces (if they don't exist).",
permission: &Permission::Anybody, permission: &Permission::Anybody,
}, },