Expose /nodes/{node}/certificates as a selectable path in the
permission path store, so the more fine-grained certificate ACL
can be assigned through the GUI.

Link: https://bugzilla.proxmox.com/show_bug.cgi?id=7513
Signed-off-by: Jakob Klocker <[email protected]>
---
 www/manager6/data/PermPathStore.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/www/manager6/data/PermPathStore.js 
b/www/manager6/data/PermPathStore.js
index 7210e0cd..bc2112ad 100644
--- a/www/manager6/data/PermPathStore.js
+++ b/www/manager6/data/PermPathStore.js
@@ -34,9 +34,16 @@ Ext.define('PVE.data.PermPathStore', {
         PVE.data.ResourceStore.each(function (record) {
             let path;
             switch (record.get('type')) {
-                case 'node':
-                    path = '/nodes/' + record.get('text');
+                case 'node': {
+                    let nodename = record.get('text');
+                    path = '/nodes/' + nodename;
+                    let certpath = '/nodes/' + nodename + '/certificates';
+                    if (!donePaths[certpath]) {
+                        me.add({ value: certpath });
+                        donePaths[certpath] = 1;
+                    }
                     break;
+                }
                 case 'network':
                     path = '/sdn/' + record.get('network-type') + 's/' + 
record.get('network');
                     break;
-- 
2.47.3



Reply via email to