mirror of
https://github.com/grafana/grafana.git
synced 2025-09-23 18:52:33 +08:00
RBAC: Fix dashboard filter in SQLBuilder (#53379)
* Reuse DasbhoardPermissionFilter * Use rbac dashboard filter if enabled
This commit is contained in:
@ -299,7 +299,13 @@ func createDummyACL(t *testing.T, sqlStore *SQLStore, dashboardPermission *Dashb
|
||||
func getDashboards(t *testing.T, sqlStore *SQLStore, search Search, aclUserID int64) []*dashboardResponse {
|
||||
t.Helper()
|
||||
|
||||
builder := &SQLBuilder{}
|
||||
old := sqlStore.Cfg.RBACEnabled
|
||||
sqlStore.Cfg.RBACEnabled = false
|
||||
defer func() {
|
||||
sqlStore.Cfg.RBACEnabled = old
|
||||
}()
|
||||
|
||||
builder := NewSqlBuilder(sqlStore.Cfg)
|
||||
signedInUser := &models.SignedInUser{
|
||||
UserId: 9999999999,
|
||||
}
|
||||
|
Reference in New Issue
Block a user