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

do not search for parents of the general folder
This commit is contained in:
Ieva 2023-05-04 09:36:36 +01:00 committed by GitHub
parent 9812ad2cb2
commit b1382ac48e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,