feat: add extra admin tools, update unit test and readme #411
+303
−0
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.
Issue #159
Summary
This PR adds 7 new admin tools:
List roles
list_all_roles– list all Grafana roles with optional delegatable filterget_role_details– fetch detailed info for a role by UIDList assignments of roles
get_role_assignments– list all users/teams/service accounts assigned to a rolelist_user_roles– list all roles assigned to specific userslist_team_roles– list all roles assigned to specific teamsDebug role assignments
get_resource_permissions– list all permissions defined on a resourceget_resource_description– describe available permissions for a resource typeAlso Updates
admin_test.goby adding new tools andREADME.mdby adding required information regarding the tools.Note for reviewer
Not sure how to set up integration test for these tools as these tools only work in Grafana Cloud and Enterprise, please give suggestions incase Integration test is necessary.
@ioanarm, please review this when you see fit, looking forward to valuable feedback.