Add support for account and entity permissions endpoints#639
Open
dawiddzhafarov wants to merge 3 commits intolinode:proj/iamfrom
Open
Add support for account and entity permissions endpoints#639dawiddzhafarov wants to merge 3 commits intolinode:proj/iamfrom
dawiddzhafarov wants to merge 3 commits intolinode:proj/iamfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for two new IAM endpoints that allow retrieving user permissions at both account and entity levels. The implementation includes the core API methods, unit tests with fixtures, and integration tests.
Changes:
- Added two new methods to the IAM group for retrieving account-level and entity-level permissions
- Created unit tests with JSON fixtures to validate the new methods
- Added integration tests to verify the endpoints work with live API
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| linode_api4/groups/iam.py | Implements account_permissions_get and entity_permissions_get methods for the IAM group |
| test/unit/groups/iam_test.py | Adds unit tests for both new permission endpoints |
| test/fixtures/iam_users_myusername_permissions_account.json | Fixture data for account permissions unit test |
| test/fixtures/iam_users_myusername_permissions_linode_1.json | Fixture data for entity permissions unit test |
| test/integration/models/iam/iam_test.py | Adds integration tests for both permission endpoints |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dawiddzhafarov
commented
Feb 4, 2026
vshanthe
suggested changes
Feb 5, 2026
mgwoj
requested changes
Mar 9, 2026
mgwoj
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR adds support for two new IAM endpoints:
GET /iam/users/{username}/permissions/{entityType}/{entityId}GET /iam/users/{username}/permissions/accountChanges include basic unit test cases along the integration tests.
✔️ How to Test
Use
DEVCLOUDlinode token along the URL: https://api.devcloud.linode.com/v4beta/.iam_betacustomer tag is required.To run unit tests:
make test-unitTo run new integration tests:
make TEST_CASE=test_get_entity_permissions test-intmake TEST_CASE=test_get_account_permissions test-intOr run all IAM integration tests:
make TEST_SUITE="iam" test-intNote that the IAM endpoints might not be stable and return random 500s.