From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/2] ui: bulk start/stop: align capability checks with backend
Date: Wed, 1 Mar 2023 15:22:19 +0100 [thread overview]
Message-ID: <20230301142220.130986-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20230301142220.130986-1-f.ebner@proxmox.com>
The backend requires VM.PowerMgmt, not Sys.PowerMgmt for bulk start
and bulk stop.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
| 4 +++-
www/manager6/node/Config.js | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
--git a/www/manager6/node/CmdMenu.js b/www/manager6/node/CmdMenu.js
index 71548e9c..dc56ef08 100644
--- a/www/manager6/node/CmdMenu.js
+++ b/www/manager6/node/CmdMenu.js
@@ -126,9 +126,11 @@ Ext.define('PVE.node.CmdMenu', {
if (!caps.vms['VM.Migrate']) {
me.getComponent('bulkmigrate').setDisabled(true);
}
- if (!caps.nodes['Sys.PowerMgmt']) {
+ if (!caps.vms['VM.PowerMgmt']) {
me.getComponent('bulkstart').setDisabled(true);
me.getComponent('bulkstop').setDisabled(true);
+ }
+ if (!caps.nodes['Sys.PowerMgmt']) {
me.getComponent('wakeonlan').setDisabled(true);
}
if (!caps.nodes['Sys.Console']) {
diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index 9269e892..0cc23fb4 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -34,13 +34,13 @@ Ext.define('PVE.node.Config', {
var actionBtn = Ext.create('Ext.Button', {
text: gettext('Bulk Actions'),
iconCls: 'fa fa-fw fa-ellipsis-v',
- disabled: !caps.nodes['Sys.PowerMgmt'] && !caps.vms['VM.Migrate'],
+ disabled: !caps.vms['VM.PowerMgmt'] && !caps.vms['VM.Migrate'],
menu: new Ext.menu.Menu({
items: [
{
text: gettext('Bulk Start'),
iconCls: 'fa fa-fw fa-play',
- disabled: !caps.nodes['Sys.PowerMgmt'],
+ disabled: !caps.vms['VM.PowerMgmt'],
handler: function() {
Ext.create('PVE.window.BulkAction', {
autoShow: true,
@@ -54,7 +54,7 @@ Ext.define('PVE.node.Config', {
{
text: gettext('Bulk Shutdown'),
iconCls: 'fa fa-fw fa-stop',
- disabled: !caps.nodes['Sys.PowerMgmt'],
+ disabled: !caps.vms['VM.PowerMgmt'],
handler: function() {
Ext.create('PVE.window.BulkAction', {
autoShow: true,
--
2.30.2
next prev parent reply other threads:[~2023-03-01 14:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 14:22 [pve-devel] [PATCH-SERIES manager] improve bulk action permissions Fiona Ebner
2023-03-01 14:22 ` Fiona Ebner [this message]
2023-03-01 14:22 ` [pve-devel] [PATCH manager 2/2] api: node: bulk actions: allow when user has permission for each guest Fiona Ebner
2023-03-15 17:22 ` [pve-devel] applied-series: [PATCH-SERIES manager] improve bulk action permissions 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=20230301142220.130986-2-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-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