mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Update API Keys UI to adjust based on users permissions (#47802)
* Update API Keys UI to adjust based on users permissions Since API Keys support now RBAC we need to ensure that UI is adjusted based on the user permissions. * Applying PR suggestions
This commit is contained in:
@@ -31,11 +31,7 @@ func RegisterRoles(ac accesscontrol.AccessControl) error {
|
||||
DisplayName: "Service accounts writer",
|
||||
Description: "Create, delete, read, or query service accounts.",
|
||||
Group: "Service accounts",
|
||||
Permissions: []accesscontrol.Permission{
|
||||
{
|
||||
Action: serviceaccounts.ActionRead,
|
||||
Scope: serviceaccounts.ScopeAll,
|
||||
},
|
||||
Permissions: accesscontrol.ConcatPermissions(saReader.Role.Permissions, []accesscontrol.Permission{
|
||||
{
|
||||
Action: serviceaccounts.ActionWrite,
|
||||
Scope: serviceaccounts.ScopeAll,
|
||||
@@ -47,7 +43,7 @@ func RegisterRoles(ac accesscontrol.AccessControl) error {
|
||||
Action: serviceaccounts.ActionDelete,
|
||||
Scope: serviceaccounts.ScopeAll,
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
Grants: []string{string(models.ROLE_ADMIN)},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user