Access control: Move data source actions and scopes to datasource package (#46594)
* Add permission actions and id scope * Remove scope and actions variable prefix * Move page evaluators and rename them
This commit is contained in:
+2
-1
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
ac "github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
"github.com/grafana/grafana/pkg/services/dashboards"
|
||||
"github.com/grafana/grafana/pkg/services/datasources"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
)
|
||||
@@ -244,7 +245,7 @@ func (hs *HTTPServer) getNavTree(c *models.ReqContext, hasEditPerm bool) ([]*dto
|
||||
|
||||
configNodes := []*dtos.NavLink{}
|
||||
|
||||
if hasAccess(ac.ReqOrgAdmin, dataSourcesConfigurationAccessEvaluator) {
|
||||
if hasAccess(ac.ReqOrgAdmin, datasources.ConfigurationPageAccess) {
|
||||
configNodes = append(configNodes, &dtos.NavLink{
|
||||
Text: "Data sources",
|
||||
Icon: "database",
|
||||
|
||||
Reference in New Issue
Block a user