From: Alexis | Dawnalex <alexis@danwalex.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] Update UI and backend integration for OpenID group creation
Date: Thu, 15 Feb 2024 22:27:01 +0100 [thread overview]
Message-ID: <20240215212739.602-2-alexis@danwalex.com> (raw)
In-Reply-To: <20240215212739.602-1-alexis@danwalex.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 3704 bytes --]
This commit introduces significant updates to the UI and backend to support group creation through OpenID. Changes include modifications to the frontend to accommodate new group management functionalities and backend enhancements for seamless OpenID integration.
Signed-off-by: Alexis | Dawnalex <alexis@danwalex.com>
---
www/manager6/dc/AuthEditOpenId.js | 84 ++++++++++++++++++++++++-------
1 file changed, 65 insertions(+), 19 deletions(-)
diff --git a/www/manager6/dc/AuthEditOpenId.js b/www/manager6/dc/AuthEditOpenId.js
index 544c0de5..c6b5e5be 100644
--- a/www/manager6/dc/AuthEditOpenId.js
+++ b/www/manager6/dc/AuthEditOpenId.js
@@ -6,15 +6,33 @@ Ext.define('PVE.panel.OpenIDInputPanel', {
onGetValues: function(values) {
let me = this;
+ if (values['client-key'] === gettext('Unchanged')) {
+ delete values['client-key'];
+ }
if (!values.verify) {
if (!me.isCreate) {
- Proxmox.Utils.assemble_field_data(values, { 'delete': 'verify' });
+ if (values['client-key'] === gettext('Unchanged')) {
+ delete values['client-key'];
+ }else{
+ Proxmox.Utils.assemble_field_data(values, { 'delete': 'verify' });
+ }
}
delete values.verify;
+
}
-
+
return me.callParent([values]);
},
+ setValues: function(values) {
+ let me = this;
+
+ // Définir "Unchanged" pour client-key uniquement en mode édition
+ if (!me.isCreate && values['client-key']) {
+ values['client-key'] = undefined;
+ }
+
+ return me.callParent([values]);
+ },
columnT: [
{
@@ -33,25 +51,18 @@ Ext.define('PVE.panel.OpenIDInputPanel', {
allowBlank: false,
},
{
- xtype: 'proxmoxtextfield',
- fieldLabel: gettext('Client Key'),
- cbind: {
- deleteEmpty: '{!isCreate}',
- },
- name: 'client-key',
+ xtype: 'proxmoxtextfield',
+ fieldLabel: gettext('Client Key'),
+ emptyText: gettext('Unchanged'),
+ cbind: {
+ deleteEmpty: '{!isCreate}',
+ },
+ name: 'client-key',
},
],
column2: [
- {
- xtype: 'proxmoxcheckbox',
- fieldLabel: gettext('Autocreate Users'),
- name: 'autocreate',
- value: 0,
- cbind: {
- deleteEmpty: '{!isCreate}',
- },
- },
+
{
xtype: 'pmxDisplayEditField',
name: 'username-claim',
@@ -82,6 +93,7 @@ Ext.define('PVE.panel.OpenIDInputPanel', {
deleteEmpty: '{!isCreate}',
},
},
+
{
xtype: 'proxmoxKVComboBox',
name: 'prompt',
@@ -101,6 +113,41 @@ Ext.define('PVE.panel.OpenIDInputPanel', {
},
],
+ columnB: [
+ {
+ xtype: 'fieldset',
+ title: gettext('Options for OpenID Connect'),
+ items: [
+ // sync option with filter group option for openid connect, so we can use the same
+
+ {
+ xtype: 'proxmoxtextfield',
+ fieldLabel: gettext('Groups Filter'),
+ name: 'groups-filter',
+ deleteEmpty: true,
+ submitEmpty: false,
+ cbind: {
+ deleteEmpty: '{!isCreate}',
+ },
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ fieldLabel: gettext('Autocreate Users'),
+ name: 'autocreate',
+ boxLabel: gettext('Create User if not exists Automatically'),
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ fieldLabel: gettext('Auto Sync Groups'),
+ name: 'autocreate-groups',
+ boxLabel: gettext('Create Groups Automatically'),
+ },
+
+ ],
+
+
+ },
+ ],
advancedColumnB: [
{
xtype: 'proxmoxtextfield',
@@ -122,5 +169,4 @@ Ext.define('PVE.panel.OpenIDInputPanel', {
me.callParent();
},
-});
-
+});
\ No newline at end of file
--
2.43.0.windows.1
prev parent reply other threads:[~2024-02-15 21:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 21:27 [pve-devel] [PATCH access-control] Add OpenID group sync in pve-access-control Alexis | Dawnalex
2024-02-15 21:27 ` Alexis | Dawnalex [this message]
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=20240215212739.602-2-alexis@danwalex.com \
--to=alexis@danwalex.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