From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3B801754C0 for ; Mon, 12 Jul 2021 09:48:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DB406121E5 for ; Mon, 12 Jul 2021 09:48:11 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id E657712198 for ; Mon, 12 Jul 2021 09:48:09 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id BE90640F96 for ; Mon, 12 Jul 2021 09:48:09 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Mon, 12 Jul 2021 09:48:06 +0200 Message-Id: <20210712074808.1103102-6-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712074808.1103102-1-d.csapak@proxmox.com> References: <20210712074808.1103102-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.626 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup 3/5] api: config: access: openid: use better Privilige Realm.Allocate X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2021 07:48:12 -0000 Signed-off-by: Dominik Csapak --- src/api2/config/access/openid.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api2/config/access/openid.rs b/src/api2/config/access/openid.rs index 5ed1cdb3..b8b07306 100644 --- a/src/api2/config/access/openid.rs +++ b/src/api2/config/access/openid.rs @@ -7,7 +7,7 @@ use ::serde::{Deserialize, Serialize}; use proxmox::api::{api, Permission, Router, RpcEnvironment}; use crate::config::domains::{self, OpenIdRealmConfig}; -use crate::config::acl::{PRIV_SYS_AUDIT, PRIV_PERMISSIONS_MODIFY}; +use crate::config::acl::{PRIV_SYS_AUDIT, PRIV_REALM_ALLOCATE}; use crate::api2::types::*; #[api( @@ -20,7 +20,7 @@ use crate::api2::types::*; items: { type: OpenIdRealmConfig }, }, access: { - permission: &Permission::Privilege(&["access", "domains"], PRIV_SYS_AUDIT, false), + permission: &Permission::Privilege(&["access", "domains"], PRIV_REALM_ALLOCATE, false), }, )] /// List configured OpenId realms @@ -49,7 +49,7 @@ pub fn list_openid_realms( }, }, access: { - permission: &Permission::Privilege(&["access", "domains"], PRIV_PERMISSIONS_MODIFY, false), + permission: &Permission::Privilege(&["access", "domains"], PRIV_REALM_ALLOCATE, false), }, )] /// Create a new OpenId realm @@ -87,7 +87,7 @@ pub fn create_openid_realm(config: OpenIdRealmConfig) -> Result<(), Error> { }, }, access: { - permission: &Permission::Privilege(&["access", "domains"], PRIV_PERMISSIONS_MODIFY, false), + permission: &Permission::Privilege(&["access", "domains"], PRIV_REALM_ALLOCATE, false), }, )] /// Remove a OpenID realm configuration @@ -204,7 +204,7 @@ pub enum DeletableProperty { }, returns: { type: OpenIdRealmConfig }, access: { - permission: &Permission::Privilege(&["access", "domains"], PRIV_PERMISSIONS_MODIFY, false), + permission: &Permission::Privilege(&["access", "domains"], PRIV_REALM_ALLOCATE, false), }, )] /// Update an OpenID realm configuration -- 2.30.2