[PR #518] [MERGED] migrate: move testUserPermissions to list userpermissions in the new cli #520

Closed
opened 2026-02-28 00:42:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/518
Author: @NemoDacremont
Created: 11/11/2025
Status: Merged
Merged: 11/12/2025
Merged by: @Tinyblargon

Base: masterHead: migrate/list-userpermissions


📝 Commits (1)

  • 913732d migrate: move testUserPermissions to list userpermissions in the new cli

📊 Changes

1 file changed (+32 additions, -0 deletions)

View changed files

cli/command/list/list-userpermissions.go (+32 -0)

📄 Description

This patch moves the command testUserPermissions from the legacy CLI to list userpermissions. I feel like the name could be better, but I also feel like it doesn't really matter so much right now.

Unlike in the legacy CLI, list userpermissions will output the array of string in json instead of using go output format for a list, I feel like it's more useful. Both arguments USER and PATH are required, I don't feel like making them optional is really useful.

fixes #517

Testing

The command can be tested by running :

NEW_CLI=true ./proxmox-api-go -i list userpermissions root@pam /
# ["Datastore.Allocate","Datastore.AllocateSpace","Datastore.AllocateTemplate","Datastore.Audit","Group.Allocate","Mapping.Audit","Mapping.Modify","Mapping.Use","Permissions.Modify","Pool.Allocate","Pool.Audit","Realm.Allocate","Realm.AllocateUser","SDN.Allocate","SDN.Audit","SDN.Use","Sys.AccessNetwork","Sys.Audit","Sys.Console","Sys.Incoming","Sys.Modify","Sys.PowerMgmt","Sys.Syslog","User.Modify","VM.Allocate","VM.Audit","VM.Backup","VM.Clone","VM.Config.CDROM","VM.Config.CPU","VM.Config.Cloudinit","VM.Config.Disk","VM.Config.HWType","VM.Config.Memory","VM.Config.Network","VM.Config.Options","VM.Console","VM.GuestAgent.Audit","VM.GuestAgent.FileRead","VM.GuestAgent.FileSystemMgmt","VM.GuestAgent.FileWrite","VM.GuestAgent.Unrestricted","VM.Migrate","VM.PowerMgmt","VM.Replicate","VM.Snapshot","VM.Snapshot.Rollback"]

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Telmate/proxmox-api-go/pull/518 **Author:** [@NemoDacremont](https://github.com/NemoDacremont) **Created:** 11/11/2025 **Status:** ✅ Merged **Merged:** 11/12/2025 **Merged by:** [@Tinyblargon](https://github.com/Tinyblargon) **Base:** `master` ← **Head:** `migrate/list-userpermissions` --- ### 📝 Commits (1) - [`913732d`](https://github.com/Telmate/proxmox-api-go/commit/913732dc5b214afa6d70237ae27b525bfd58f2c1) migrate: move testUserPermissions to list userpermissions in the new cli ### 📊 Changes **1 file changed** (+32 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `cli/command/list/list-userpermissions.go` (+32 -0) </details> ### 📄 Description This patch moves the command `testUserPermissions` from the legacy CLI to `list userpermissions`. I feel like the name could be better, but I also feel like it doesn't really matter so much right now. Unlike in the legacy CLI, `list userpermissions` will output the array of string in json instead of using go output format for a list, I feel like it's more useful. Both arguments USER and PATH are required, I don't feel like making them optional is really useful. fixes #517 ### Testing The command can be tested by running : ```sh NEW_CLI=true ./proxmox-api-go -i list userpermissions root@pam / # ["Datastore.Allocate","Datastore.AllocateSpace","Datastore.AllocateTemplate","Datastore.Audit","Group.Allocate","Mapping.Audit","Mapping.Modify","Mapping.Use","Permissions.Modify","Pool.Allocate","Pool.Audit","Realm.Allocate","Realm.AllocateUser","SDN.Allocate","SDN.Audit","SDN.Use","Sys.AccessNetwork","Sys.Audit","Sys.Console","Sys.Incoming","Sys.Modify","Sys.PowerMgmt","Sys.Syslog","User.Modify","VM.Allocate","VM.Audit","VM.Backup","VM.Clone","VM.Config.CDROM","VM.Config.CPU","VM.Config.Cloudinit","VM.Config.Disk","VM.Config.HWType","VM.Config.Memory","VM.Config.Network","VM.Config.Options","VM.Console","VM.GuestAgent.Audit","VM.GuestAgent.FileRead","VM.GuestAgent.FileSystemMgmt","VM.GuestAgent.FileWrite","VM.GuestAgent.Unrestricted","VM.Migrate","VM.PowerMgmt","VM.Replicate","VM.Snapshot","VM.Snapshot.Rollback"] ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:42:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#520
No description provided.