mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 15:35:51 +03:00
[PR #315] [MERGED] Feature: Dynamic permission checking. #388
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#388
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?
📋 Pull Request Information
Original PR: https://github.com/Telmate/proxmox-api-go/pull/315
Author: @Tinyblargon
Created: 3/5/2024
Status: ✅ Merged
Merged: 3/9/2024
Merged by: @Tinyblargon
Base:
master← Head:Feature#308📝 Commits (4)
7d7642cfeat: permission checkinga8821f0feat: add example to update the permisson cache4b38dbffix: returned error when permission does not exist60d15a6fix: panic permissions nil📊 Changes
6 files changed (+853 additions, -9 deletions)
View changed files
📝
proxmox/client.go(+107 -9)📝
proxmox/client_test.go(+44 -0)📝
proxmox/config_qemu.go(+3 -0)➕
proxmox/permission.go(+651 -0)➕
proxmox/permission_test.go(+39 -0)📝
proxmox/util.go(+9 -0)📄 Description
Add a framework for checking if the user has the right permissions to do a given operation.
The main function this adds is
*Client.CheckPermissions().This Feature is mostly adding new code and isn't modifying any existing code/behavior.
The only place some modification was made to existing code is in
ConfigQemu.setAdvanced()where*Client.insertCachedPermission()is called as an example, and to satisfy the static check. This adds an item to a currently empty empty cache.Closes #308
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
TaskInterface for long running functions #431