[v11.0.x] RBAC: List only the folders that the user has access to (#89015)
RBAC: List only the folders that the user has access to (#88599)
only check folder permissions when listing folders
(cherry picked from commit 095ca66d9f)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
committed by
GitHub
parent
03caca4576
commit
100ea77047
@@ -349,10 +349,8 @@ func (s *Service) getRootFolders(ctx context.Context, q *folder.GetChildrenQuery
|
||||
var folderPermissions []string
|
||||
if q.Permission == dashboardaccess.PERMISSION_EDIT {
|
||||
folderPermissions = permissions[dashboards.ActionFoldersWrite]
|
||||
folderPermissions = append(folderPermissions, permissions[dashboards.ActionDashboardsWrite]...)
|
||||
} else {
|
||||
folderPermissions = permissions[dashboards.ActionFoldersRead]
|
||||
folderPermissions = append(folderPermissions, permissions[dashboards.ActionDashboardsRead]...)
|
||||
}
|
||||
|
||||
if len(folderPermissions) == 0 && !q.SignedInUser.GetIsGrafanaAdmin() {
|
||||
|
||||
Reference in New Issue
Block a user