mirror of
https://github.com/luthermonson/go-proxmox.git
synced 2026-04-26 17:35:48 +03:00
[GH-ISSUE #180] Setting ACL with UpdateACL couldn't work #44
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-proxmox#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ybizeul on GitHub (Nov 24, 2024).
Original GitHub issue: https://github.com/luthermonson/go-proxmox/issues/180
I was trying to use
func (c *Client) UpdateACL(ctx context.Context, acl ACL) errorto add ACLs to a Pool.Something like :
It seems that can't be used, and is being sent as-is to

/access/acl, without proper lowercase on map keys (see missing key in tags atgithub.com/luthermonson/go-proxmox@5617b30530/types.go (L1266)), and it wouldn't work any ways because the proper way to update ACLs would be :I ended up doing this, which works fine :
Maybe I'm doing something wrong, using a wrong API version somehow ?
@linuxdaemon commented on GitHub (Jul 14, 2025):
Looks like there's 2 problems here, the ACLOptions type seems to be what should be sent for UpdateACL, and both the ACLOptions and ACL structs are missing the json field name overrides in the
jsontag.I just ran into this issue as well