* expose frontend to users with permissions
* cover the ui endpoints
* fix permissions
(cherry picked from commit e50bd5cac8)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
co-authored by
Ieva
parent
37e5b0fbc7
commit
5c41d84f88
@@ -5,6 +5,7 @@ import (
|
||||
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/serviceaccounts"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
)
|
||||
|
||||
@@ -462,6 +463,12 @@ var teamsEditAccessEvaluator = ac.EvalAll(
|
||||
),
|
||||
)
|
||||
|
||||
// apiKeyAccessEvaluator is used to protect the "Configuration > API keys" page access
|
||||
var apiKeyAccessEvaluator = ac.EvalPermission(ac.ActionAPIKeyRead)
|
||||
|
||||
// serviceAccountAccessEvaluator is used to protect the "Configuration > Service accounts" page access
|
||||
var serviceAccountAccessEvaluator = ac.EvalPermission(serviceaccounts.ActionRead)
|
||||
|
||||
// Metadata helpers
|
||||
// getAccessControlMetadata returns the accesscontrol metadata associated with a given resource
|
||||
func (hs *HTTPServer) getAccessControlMetadata(c *models.ReqContext,
|
||||
|
||||
Reference in New Issue
Block a user