]> git.proxmox.com Git - proxmox-backup.git/commit - src/api2/admin/datastore.rs
api: datastore: refactor priv checks
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 9 May 2022 15:41:57 +0000 (17:41 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 12 May 2022 07:33:50 +0000 (09:33 +0200)
commit2bc2435a96ef7926086f14a1c4af4fb2a6b62f6e
treece2f3caec4aac34009352b7654ae4c5b94f7b546
parenta724f5fd478e8c2eb3e2fec16b0faae9213d86e6
api: datastore: refactor priv checks

the helper now takes both high-privilege and lesser-privilege privs, so
the resulting bool can be used to quickly check whether additional
checks like group ownership are needed or not.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/api2/admin/datastore.rs