public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: Add verify SSL cert checkbox for active directory
Date: Tue, 27 Oct 2020 12:34:25 +0100	[thread overview]
Message-ID: <20201027113425.102778-1-d.jaeger@proxmox.com> (raw)

Like for LDAP, the option is too important to be hidden in CLI.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
The verify parameter seems to be implemented in the LDAP code [0] as well
as in the AD code [1]

[0] https://git.proxmox.com/?p=pve-access-control.git;a=blob;f=PVE/Auth/LDAP.pm;h=97d077886cd904863b65270580da8f46fb62f376;hb=HEAD#l192
[1] https://git.proxmox.com/?p=pve-access-control.git;a=blob;f=PVE/Auth/AD.pm;h=88b2098355bd3d1bf9cfb32be6ea257083b891d1;hb=HEAD#l118

 www/manager6/dc/AuthEditAD.js | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/www/manager6/dc/AuthEditAD.js b/www/manager6/dc/AuthEditAD.js
index 31a6a360..d70d6f3b 100644
--- a/www/manager6/dc/AuthEditAD.js
+++ b/www/manager6/dc/AuthEditAD.js
@@ -46,9 +46,44 @@ Ext.define('PVE.panel.ADInputPanel', {
 		fieldLabel: 'SSL',
 		name: 'secure',
 		uncheckedValue: 0,
+		listeners: {
+		    change: function(field, newValue) {
+			let verifyCheckbox = field.nextSibling('proxmoxcheckbox[name=verify]');
+			if (newValue === true) {
+			    verifyCheckbox.enable();
+			} else {
+			    verifyCheckbox.disable();
+			    verifyCheckbox.setValue(0);
+			}
+		    },
+		},
+	    },
+	    {
+		xtype: 'proxmoxcheckbox',
+		fieldLabel: gettext('Verify Certificate'),
+		name: 'verify',
+		unceckedValue: 0,
+		disabled: true,
+		checked: false,
+		autoEl: {
+		    tag: 'div',
+		    'data-qtip': gettext('Verify SSL certificate of the server'),
+		},
 	    },
 	];
 
 	me.callParent();
     },
+    onGetValues: function(values) {
+	let me = this;
+
+	if (!values.verify) {
+	    if (!me.isCreate) {
+		Proxmox.Utils.assemble_field_data(values, { 'delete': 'verify' });
+	    }
+	    delete values.verify;
+	}
+
+	return me.callParent([values]);
+    },
 });
-- 
2.20.1




             reply	other threads:[~2020-10-27 11:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 11:34 Dominic Jäger [this message]
2020-10-29 18:41 ` [pve-devel] applied: " 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=20201027113425.102778-1-d.jaeger@proxmox.com \
    --to=d.jaeger@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal