public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH access-control v2 1/2] realm: sync: allow 'none' for 'remove-vanished' option
Date: Tue,  6 Dec 2022 12:06:30 +0100	[thread overview]
Message-ID: <20221206110635.1885744-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20221206110635.1885744-1-d.csapak@proxmox.com>

with that, the api call can now override the default option
that is set on the realm (if any) by providing 'none'

it was not possible previously to override the realm default
when one wanted no properties to delete

no other code changes are necessary since we only extract the
known values 'acl' etc. and 'none' has no meaning there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/PVE/Auth/Plugin.pm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/PVE/Auth/Plugin.pm b/src/PVE/Auth/Plugin.pm
index 03d3342..bae9fb9 100755
--- a/src/PVE/Auth/Plugin.pm
+++ b/src/PVE/Auth/Plugin.pm
@@ -63,10 +63,12 @@ my $realm_sync_options_desc = {
 	    ." vanishes during a sync. The following values are possible: 'entry' removes the"
 	    ." user/group when not returned from the sync. 'properties' removes the set"
 	    ." properties on existing user/group that do not appear in the source (even custom ones)."
-	    ." 'acl' removes acls when the user/group is not returned from the sync.",
+	    ." 'acl' removes acls when the user/group is not returned from the sync."
+	    ." Instead of a list it also can be 'none' (the default).",
 	type => 'string',
-	typetext => "[acl];[properties];[entry]",
-	pattern => "(?:$remove_options\;)*$remove_options",
+	default => 'none',
+	typetext => "([acl];[properties];[entry])|none",
+	pattern => "(?:(?:$remove_options\;)*$remove_options)|none",
 	optional => '1',
     },
     # TODO check/rewrite in pve7to8, and remove with 8.0
-- 
2.30.2





  reply	other threads:[~2022-12-06 11:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 11:06 [pve-devel] [PATCH access-control/wt/manager v2] add realm sync jobs Dominik Csapak
2022-12-06 11:06 ` Dominik Csapak [this message]
2022-12-14 11:16   ` [pve-devel] applied: [PATCH access-control v2 1/2] realm: sync: allow 'none' for 'remove-vanished' option Thomas Lamprecht
2022-12-06 11:06 ` [pve-devel] [PATCH access-control v2 2/2] add realmsync plugin for jobs and CRUD api for domainsync-jobs Dominik Csapak
2022-12-13 13:43   ` Thomas Lamprecht
2022-12-14  9:53     ` Dominik Csapak
2022-12-06 11:06 ` [pve-devel] [PATCH widget-toolkit v2 1/1] RealmComboBox: add custom store filters for callers Dominik Csapak
2022-12-06 11:06 ` [pve-devel] [PATCH manager v2 1/3] ui: realm: sync: don't use realm defaults for remove-vanished Dominik Csapak
2022-12-06 11:08   ` Dominik Csapak
2022-12-13 14:15   ` [pve-devel] applied: " Thomas Lamprecht
2022-12-14  9:42     ` Dominik Csapak
2022-12-06 11:06 ` [pve-devel] [PATCH manager v2 2/3] Jobs: add RealmSync Plugin and register it Dominik Csapak
2022-12-06 11:06 ` [pve-devel] [PATCH manager v2 3/3] ui: add Realm Sync panel Dominik Csapak

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=20221206110635.1885744-2-d.csapak@proxmox.com \
    --to=d.csapak@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