all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [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

* [pbs-devel] applied: [PATCH proxmox-backup] api: tape: add permission to move_tape endpoint
  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 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-11-12 12:56 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Hannes Laimer

Am 06.11.24 um 11:45 schrieb Hannes Laimer:
> ... 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(-)
> 
>

applied, thanks!


_______________________________________________
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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal