From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] api: tape: add permission to move_tape endpoint
Date: Wed, 6 Nov 2024 11:45:12 +0100 [thread overview]
Message-ID: <20241106104512.41479-1-h.laimer@proxmox.com> (raw)
... 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
next reply other threads:[~2024-11-06 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 10:45 Hannes Laimer [this message]
2024-11-12 12:56 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241106104512.41479-1-h.laimer@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox