[v10.0.x] RBAC: Do not search for parents of the root folder (#67806)

RBAC: Do not search for parents of the root folder (#67746)

do not search for parents of the general folder

(cherry picked from commit b1382ac48e)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2023-05-04 08:55:41 +00:00
committed by GitHub
co-authored by Ieva
parent a219338afd
commit d05ba80080
+3
View File
@@ -196,6 +196,9 @@ func resolveDashboardScope(ctx context.Context, folderDB folder.FolderStore, org
}
func GetInheritedScopes(ctx context.Context, orgID int64, folderUID string, folderSvc folder.Service) ([]string, error) {
if folderUID == ac.GeneralFolderUID {
return nil, nil
}
ancestors, err := folderSvc.GetParents(ctx, folder.GetParentsQuery{
UID: folderUID,
OrgID: orgID,