From: "Shannon Sterz" <s.sterz@proxmox.com>
To: "Shannon Sterz" <s.sterz@proxmox.com>
Cc: pdm-devel@lists.proxmox.com
Subject: Re: [pdm-devel] [PATCH datacenter-manager/proxmox/yew-comp v2 00/10] add support for checking acl permissions in (yew) front-ends
Date: Fri, 24 Oct 2025 16:53:55 +0200 [thread overview]
Message-ID: <DDQMZRC5UXE9.237HCXR669QEY@proxmox.com> (raw)
In-Reply-To: <20251022131126.358790-1-s.sterz@proxmox.com>
On Wed Oct 22, 2025 at 3:11 PM CEST, Shannon Sterz wrote:
> this patch series adds support for querying acl entries from the
> front-end. it also makes it possible to reactively render ui components
> depending on the user's privileges and refreshes this information every
> time a new ticket is set.
>
> the first four patches make it possible to use the AclTree by itself in
> the ui. first by creating a new feature that exposes only it and some
> types to dependent crates. then some functions that basically just query
> the AclTree are moved to the AclTree itself to make it easier to re-use
> them. the third patch derives Debug and PartialEq on the AclTree and
> AclTreeNode to make it easier to handle these types in the ui. finally
> the last commit allows to query all of a user's acl entries via the
> API_METHOD_READ_ACL endpoint.
>
> the next two patches first add an AclContext and AclContextProvider
> implementation to proxmox-yew-comp. these allow applications to provide
> acl information that components can hook into and get reactively
> re-rendered. it also triggers reloading the acl information every time a
> user logs in or a ticket gets refreshed.
>
> lastly, proxmox-datacenter-manager is adapted to use this new
> functionality. the seventh commit moves the AccessControlConfig to the
> shared api types crate, so we can re-use it in the front-end. then an
> AclContextProvider is added to the main ui component. this allows
> components to retrieve said AclContext and use it to conditionally
> render ui components. the last two commits add just such functionality
> to the notes section of the pdm ui.
>
> Follow-up
> ---------
>
> if this series is applied, more ui components will need to be hooked
> into the context to more widely use this functionality accross the
> application.
>
> proxmox:
>
> Shannon Sterz (4):
> access-control: add acl feature to only expose types and the AclTree
> access-control: move functions querying privileges to the AclTree
> access-control: derive Debug and PartialEq on AclTree and AclTreeNode
> access-control: allow reading all acls of the current authid
>
> proxmox-access-control/Cargo.toml | 6 +-
> proxmox-access-control/src/acl.rs | 132 +++++++++++++++++-
> proxmox-access-control/src/api/acl.rs | 37 ++++-
> .../src/cached_user_info.rs | 91 +-----------
> proxmox-access-control/src/init.rs | 13 +-
> proxmox-access-control/src/lib.rs | 4 +-
> 6 files changed, 184 insertions(+), 99 deletions(-)
>
>
> proxmox-yew-comp:
>
> Shannon Sterz (2):
> acl_context: add AclContext and AclContextProvider
> http_helpers: reload LocalAclTree when logging in or refreshing a
> ticket
>
> Cargo.toml | 2 +-
> src/acl_context.rs | 204 ++++++++++++++++++++++++++++++++++++++++++++
> src/http_helpers.rs | 5 ++
> src/lib.rs | 3 +
> 4 files changed, 213 insertions(+), 1 deletion(-)
> create mode 100644 src/acl_context.rs
>
>
> proxmox-datacenter-manager:
>
> Shannon Sterz (2):
> server/api-types: move AccessControlConfig to shared api types
> ui: add an AclContext via the AclContextProvider to the main app ui
>
> lib/pdm-api-types/Cargo.toml | 1 +
> lib/pdm-api-types/src/acl.rs | 158 ++++++++++++++++++++++++++++++++++
> server/src/acl.rs | 162 +----------------------------------
> ui/Cargo.toml | 1 +
> ui/src/main.rs | 14 ++-
> 5 files changed, 173 insertions(+), 163 deletions(-)
>
>
> proxmox-yew-comp:
>
> Shannon Sterz (1):
> notes view: allow hiding the toolbar if editing isn't supported
>
> src/notes_view.rs | 36 +++++++++++++++++++++++-------------
> 1 file changed, 23 insertions(+), 13 deletions(-)
>
>
> proxmox-datacenter-manager:
>
> Shannon Sterz (1):
> ui: main menu: use the AclContext to hide the Notes if appropriate
>
> ui/src/main_menu.rs | 66 +++++++++++++++++++++++++++++++--------------
> 1 file changed, 46 insertions(+), 20 deletions(-)
>
>
> Summary over all repositories:
> 17 files changed, 639 insertions(+), 296 deletions(-)
>
> --
> Generated by git-murpp 0.8.1
Superseded-by: https://lore.proxmox.com/all/20251024145126.384611-1-s.sterz@proxmox.com/
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-10-24 14:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 13:11 Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH proxmox v2 1/4] access-control: add acl feature to only expose types and the AclTree Shannon Sterz
2025-10-23 9:24 ` Dominik Csapak
2025-10-23 11:32 ` Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH proxmox v2 2/4] access-control: move functions querying privileges to " Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH proxmox v2 3/4] access-control: derive Debug and PartialEq on AclTree and AclTreeNode Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH proxmox v2 4/4] access-control: allow reading all acls of the current authid Shannon Sterz
2025-10-23 9:31 ` Dominik Csapak
2025-10-23 11:32 ` Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH yew-comp v2 1/2] acl_context: add AclContext and AclContextProvider Shannon Sterz
2025-10-23 10:00 ` Dominik Csapak
2025-10-23 11:33 ` Shannon Sterz
2025-10-23 11:39 ` Dominik Csapak
2025-10-22 13:11 ` [pdm-devel] [PATCH yew-comp v2 2/2] http_helpers: reload LocalAclTree when logging in or refreshing a ticket Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH datacenter-manager v2 1/2] server/api-types: move AccessControlConfig to shared api types Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH datacenter-manager v2 2/2] ui: add an AclContext via the AclContextProvider to the main app ui Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH yew-comp v2 1/1] notes view: allow hiding the toolbar if editing isn't supported Shannon Sterz
2025-10-23 9:36 ` Dominik Csapak
2025-10-23 11:33 ` Shannon Sterz
2025-10-22 13:11 ` [pdm-devel] [PATCH datacenter-manager v2 1/1] ui: main menu: use the AclContext to hide the Notes if appropriate Shannon Sterz
2025-10-24 14:53 ` Shannon Sterz [this message]
2025-10-24 14:51 [pdm-devel] [PATCH datacenter-manager/proxmox/yew-comp v2 00/10] add support for checking acl permissions in (yew) front-ends Shannon Sterz
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=DDQMZRC5UXE9.237HCXR669QEY@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pdm-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