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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 2B29C636B2 for ; Fri, 25 Feb 2022 11:13:53 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1892620DBB for ; Fri, 25 Feb 2022 11:13:23 +0100 (CET) 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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 9916020DB1 for ; Fri, 25 Feb 2022 11:13:22 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 771844612D; Fri, 25 Feb 2022 11:13:16 +0100 (CET) Message-ID: Date: Fri, 25 Feb 2022 11:13:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Thunderbird/98.0 Content-Language: en-US To: Proxmox VE development discussion , =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= References: <20220208131011.752134-1-o.bektas@proxmox.com> <20220208131011.752134-5-o.bektas@proxmox.com> <1644500864.trbyijgtmq.astroid@nora.none> From: Dominik Csapak In-Reply-To: <1644500864.trbyijgtmq.astroid@nora.none> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -2.345 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 KAM_SOMETLD_ARE_BAD_TLD 5 .stream, .trade, .pw, .top, .press, .guru, .casa, .online, .cam, .shop, .bar, .club, .sbs & .date TLD Abuse NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [PATCH v1 manager 4/5] change 'root@pam' checks with 'SuperUser' capability check X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2022 10:13:53 -0000 On 2/10/22 16:29, Fabian Grünbichler wrote: >> me.items.push({ >> xtype: 'pveACMEClusterView', >> title: 'ACME', >> diff --git a/www/manager6/dc/UserView.js b/www/manager6/dc/UserView.js >> index bbfc4f7c..fe0c0149 100644 >> --- a/www/manager6/dc/UserView.js >> +++ b/www/manager6/dc/UserView.js >> @@ -29,7 +29,7 @@ Ext.define('PVE.dc.UserView', { >> selModel: sm, >> baseurl: '/access/users/', >> dangerous: true, >> - enableFn: rec => caps.access['User.Modify'] && rec.data.userid !== 'root@pam', >> + enableFn: rec => caps.access['User.Modify'] && !caps.access.SuperUser, > no rationale given for the different way of accessing - I'll leave it to > more JS affine reviewers to decide whether this is sensible or not, but > please provide the reason WHY this doesn't use `caps.access['SuperUser']` just to give the reason: eslint complains if we use foo['bar'] when we could use foo.bar we prefer 'dot-notation' (so foo.bar.baz) for objects, but in all other cases of the caps object that does not work because the keys themselves contain a '.' > > also, it's wrong - a SuperUser still requires User.Modify to modify > users, so this either needs to stay as it is or simply drop the root@pam > shortcut. >