RBAC: Allow scoping access to root level dashboards (#76987)

* correctly check permissions to list dashboards on the root

* correctly display the access inherited from general folder for dashboards

* Update pkg/services/sqlstore/permissions/dashboard.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update dashboard_filter_no_subquery.go

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
This commit is contained in:
Ieva
2023-10-24 09:55:38 +01:00
committed by GitHub
parent bd2b4e956b
commit 159bb3c032
4 changed files with 84 additions and 11 deletions
@@ -163,7 +163,7 @@ func ProvideDashboardPermissions(
}
return append([]string{parentScope}, nestedScopes...), nil
}
return []string{}, nil
return []string{dashboards.ScopeFoldersProvider.GetResourceScopeUID(folder.GeneralFolderUID)}, nil
},
Assignments: resourcepermissions.Assignments{
Users: true,