[v11.1.x] RBAC: List only the folders that the user has access to (#89016)
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:
co-authored by
Ieva
parent
c5ea48aec9
commit
eab471a17c
@@ -347,10 +347,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