SecretsManager: Add roles and access control to APIs (#102456)
This commit is contained in:
@@ -76,24 +76,26 @@ func ProvidePermissionRegistry() PermissionRegistry {
|
||||
func newPermissionRegistry() *permissionRegistry {
|
||||
// defaultKindScopes maps the most specific accepted scope prefix for a given kind (folders, dashboards, etc)
|
||||
defaultKindScopes := map[string]string{
|
||||
"teams": "teams:id:",
|
||||
"users": "users:id:",
|
||||
"datasources": "datasources:uid:",
|
||||
"dashboards": "dashboards:uid:",
|
||||
"folders": "folders:uid:",
|
||||
"annotations": "annotations:type:",
|
||||
"apikeys": "apikeys:id:",
|
||||
"orgs": "orgs:id:",
|
||||
"plugins": "plugins:id:",
|
||||
"provisioners": "provisioners:",
|
||||
"reports": "reports:id:",
|
||||
"permissions": "permissions:type:",
|
||||
"serviceaccounts": "serviceaccounts:id:",
|
||||
"settings": "settings:",
|
||||
"global.users": "global.users:id:",
|
||||
"roles": "roles:uid:",
|
||||
"services": "services:",
|
||||
"receivers": "receivers:uid:",
|
||||
"teams": "teams:id:",
|
||||
"users": "users:id:",
|
||||
"datasources": "datasources:uid:",
|
||||
"dashboards": "dashboards:uid:",
|
||||
"folders": "folders:uid:",
|
||||
"annotations": "annotations:type:",
|
||||
"apikeys": "apikeys:id:",
|
||||
"orgs": "orgs:id:",
|
||||
"plugins": "plugins:id:",
|
||||
"provisioners": "provisioners:",
|
||||
"reports": "reports:id:",
|
||||
"permissions": "permissions:type:",
|
||||
"serviceaccounts": "serviceaccounts:id:",
|
||||
"settings": "settings:",
|
||||
"global.users": "global.users:id:",
|
||||
"roles": "roles:uid:",
|
||||
"services": "services:",
|
||||
"receivers": "receivers:uid:",
|
||||
"secret.securevalues": "secret.securevalues:uid:",
|
||||
"secret.keepers": "secret.keepers:uid:",
|
||||
}
|
||||
return &permissionRegistry{
|
||||
actionScopePrefixes: make(map[string]PrefixSet, 200),
|
||||
|
||||
Reference in New Issue
Block a user