]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
Utils: add authSchema from PVE and make it overrideable
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 9 Jul 2021 11:42:22 +0000 (13:42 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 9 Jul 2021 12:46:27 +0000 (14:46 +0200)
like we do for the task_descriptions.
This way we can have a basic config that is true for all products
and override where necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/Utils.js

index 8e1f9d41a7c8b946ba59fe06f79c8fba056301e2..42cc02c4defff002c87dc6bd82953901e721ac11 100644 (file)
@@ -1150,6 +1150,22 @@ utilities: {
 
        return icon;
     },
+
+    authSchema: {
+       pam: {
+           name: 'Linux PAM',
+           add: false,
+           edit: false,
+           pwchange: true,
+       },
+    },
+
+    // to add or change existing for product specific ones
+    overrideAuthSchema: function(extra) {
+       for (const [key, value] of Object.entries(extra)) {
+           Proxmox.Utils.authSchema[key] = value;
+       }
+    },
 },
 
     singleton: true,