mirror of
https://github.com/grafana/grafana.git
synced 2025-01-14 10:42:39 -06:00
314be36a7c
* create scope provider * move datasource actions and scopes to datasource package + add provider * change usages to use datasource scopes and update data source name resolver to use provider * move folder permissions to dashboard package and update usages
20 lines
593 B
Go
20 lines
593 B
Go
package datasources
|
|
|
|
import "github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
|
|
const (
|
|
ActionDatasourcesRead = "datasources:read"
|
|
ActionDatasourcesQuery = "datasources:query"
|
|
ActionDatasourcesCreate = "datasources:create"
|
|
ActionDatasourcesWrite = "datasources:write"
|
|
ActionDatasourcesDelete = "datasources:delete"
|
|
ActionDatasourcesIDRead = "datasources.id:read"
|
|
|
|
ScopeDatasourcesRoot = "datasources"
|
|
)
|
|
|
|
var (
|
|
ScopeDatasourcesAll = accesscontrol.GetResourceAllScope(ScopeDatasourcesRoot)
|
|
ScopeDatasourcesProvider = accesscontrol.NewScopeProvider(ScopeDatasourcesRoot)
|
|
)
|