Skip to content
Merged
Prev Previous commit
Next Next commit
remove unnecessary dbauthz.AsSystemRestricted
  • Loading branch information
hugodutka committed Jan 29, 2025
commit 0d3a9a6b221c1e0e3358c5b4358bcbbba482f9e4
5 changes: 1 addition & 4 deletions coderd/telemetry/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/coder/coder/v2/buildinfo"
clitelemetry "github.com/coder/coder/v2/cli/telemetry"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/dbauthz"
"github.com/coder/coder/v2/coderd/database/dbtime"
"github.com/coder/coder/v2/codersdk"
tailnetproto "github.com/coder/coder/v2/tailnet/proto"
Expand Down Expand Up @@ -570,9 +569,7 @@ func (r *remoteReporter) createSnapshot() (*Snapshot, error) {
// the database. It will no longer be reported, and there will be no other
// indicator that it was deleted. This requires special handling when
// interpreting the telemetry data later.
// nolint:gocritic // AsSystemRestricted is fine here because it's a read-only operation
// used for telemetry reporting.
orgs, err := r.options.Database.GetOrganizations(dbauthz.AsSystemRestricted(r.ctx), database.GetOrganizationsParams{})
orgs, err := r.options.Database.GetOrganizations(r.ctx, database.GetOrganizationsParams{})
if err != nil {
return xerrors.Errorf("get organizations: %w", err)
}
Expand Down
Loading