* [pbs-devel] [PATCH proxmox-backup] api: tape: add permission to move_tape endpoint
@ 2024-11-06 10:45 Hannes Laimer
2024-11-12 12:56 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Laimer @ 2024-11-06 10:45 UTC (permalink / raw)
To: pbs-devel
... so it is usable by non-root users, this came up in support.
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
This came up in enterprise support, but it also makes sense generally
src/api2/tape/media.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/api2/tape/media.rs b/src/api2/tape/media.rs
index a7c8483a..2ed3e961 100644
--- a/src/api2/tape/media.rs
+++ b/src/api2/tape/media.rs
@@ -9,7 +9,8 @@ use proxmox_uuid::Uuid;
use pbs_api_types::{
Authid, MediaContentEntry, MediaContentListFilter, MediaListEntry, MediaPoolConfig,
MediaSetListEntry, MediaStatus, CHANGER_NAME_SCHEMA, MEDIA_LABEL_SCHEMA,
- MEDIA_POOL_NAME_SCHEMA, MEDIA_UUID_SCHEMA, PRIV_TAPE_AUDIT, VAULT_NAME_SCHEMA,
+ MEDIA_POOL_NAME_SCHEMA, MEDIA_UUID_SCHEMA, PRIV_TAPE_AUDIT, PRIV_TAPE_MODIFY,
+ VAULT_NAME_SCHEMA,
};
use pbs_config::CachedUserInfo;
@@ -305,6 +306,9 @@ pub async fn list_media(
},
},
},
+ access: {
+ permission: &Permission::Privilege(&["tape"], PRIV_TAPE_MODIFY, false),
+ },
)]
/// Change Tape location to vault (if given), or offline.
pub fn move_tape(
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-12 12:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-06 10:45 [pbs-devel] [PATCH proxmox-backup] api: tape: add permission to move_tape endpoint Hannes Laimer
2024-11-12 12:56 ` [pbs-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox