[v9.3.x] DataSourcePermissions: Handle licensing properly for ds permissions (#59709)

DataSourcePermissions: Handle licensing properly for ds permissions (#59694)

* RBAC: add viewer grand if dspermissions enforcement is not enabled

* RBAC: Change permissions based on role prefix

* RBAC: Add option to for permission service to add a license middleware

* RBAC: Remove actions from query struct

(cherry picked from commit 6d1bcd9f40)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
Grot (@grafanabot)andKarl Persson authored and GitHub committed 2022-12-02 13:40:03 +01:00
1 parent a271e24b3d
commit 04fb50f8cc
9 files changed
+29 -42

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ func (hs *HTTPServer) declareFixedRoles() error {
}
// when running oss or enterprise without a license all users should be able to query data sources
if !hs.License.FeatureEnabled("accesscontrol.enforcement") {
if !hs.License.FeatureEnabled("dspermissions.enforcement") {
datasourcesReaderRole.Grants = []string{string(org.RoleViewer)}
}