File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import (
29
29
"github.com/coder/coder/v2/buildinfo"
30
30
clitelemetry "github.com/coder/coder/v2/cli/telemetry"
31
31
"github.com/coder/coder/v2/coderd/database"
32
+ "github.com/coder/coder/v2/coderd/database/dbauthz"
32
33
"github.com/coder/coder/v2/coderd/database/dbtime"
33
34
"github.com/coder/coder/v2/codersdk"
34
35
tailnetproto "github.com/coder/coder/v2/tailnet/proto"
@@ -536,7 +537,9 @@ func (r *remoteReporter) createSnapshot() (*Snapshot, error) {
536
537
// no longer be reported, and there will be no other indicator that it
537
538
// was deleted. This requires special handling when interpreting the
538
539
// telemetry data later.
539
- orgs , err := r .options .Database .GetOrganizations (ctx , database.GetOrganizationsParams {})
540
+ // nolint:gocritic // AsSystemRestricted is fine here because it's a read-only operation
541
+ // used for telemetry reporting.
542
+ orgs , err := r .options .Database .GetOrganizations (dbauthz .AsSystemRestricted (r .ctx ), database.GetOrganizationsParams {})
540
543
if err != nil {
541
544
return xerrors .Errorf ("get organizations: %w" , err )
542
545
}
You can’t perform that action at this time.
0 commit comments