mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 09:32:23 +08:00
Chore: Propagate context for dashboard guardian (#39201)
Require guardian.New to take context.Context as first argument. Migrates the GetDashboardAclInfoListQuery to be dispatched using context. Ref #36734 Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> Co-authored-by: sam boyer <sam.boyer@grafana.com>
This commit is contained in:

committed by
GitHub

parent
914ae81026
commit
518a0d0458
@ -338,7 +338,7 @@ func TestAccountDataAccess(t *testing.T) {
|
||||
|
||||
Convey("Should remove dependent permissions for deleted org user", func() {
|
||||
permQuery := &models.GetDashboardAclInfoListQuery{DashboardID: dash1.Id, OrgID: ac1.OrgId}
|
||||
err = GetDashboardAclInfoList(permQuery)
|
||||
err = sqlStore.GetDashboardAclInfoList(context.Background(), permQuery)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(len(permQuery.Result), ShouldEqual, 0)
|
||||
@ -346,7 +346,7 @@ func TestAccountDataAccess(t *testing.T) {
|
||||
|
||||
Convey("Should not remove dashboard permissions for same user in another org", func() {
|
||||
permQuery := &models.GetDashboardAclInfoListQuery{DashboardID: dash2.Id, OrgID: ac3.OrgId}
|
||||
err = GetDashboardAclInfoList(permQuery)
|
||||
err = sqlStore.GetDashboardAclInfoList(context.Background(), permQuery)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(len(permQuery.Result), ShouldEqual, 1)
|
||||
|
Reference in New Issue
Block a user