From b1382ac48e890cb55ae963f749e6a2b4e5b0981e Mon Sep 17 00:00:00 2001 From: Ieva Date: Thu, 4 May 2023 09:36:36 +0100 Subject: [PATCH] RBAC: Do not search for parents of the root folder (#67746) do not search for parents of the general folder --- pkg/services/dashboards/accesscontrol.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/services/dashboards/accesscontrol.go b/pkg/services/dashboards/accesscontrol.go index 2451fac0c81..3b798fddb4d 100644 --- a/pkg/services/dashboards/accesscontrol.go +++ b/pkg/services/dashboards/accesscontrol.go @@ -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,