diff --git a/authorizer/source.go b/authorizer/source.go index 37c74fa397..cd89f409bb 100644 --- a/authorizer/source.go +++ b/authorizer/source.go @@ -4,6 +4,7 @@ import ( "context" "github.com/influxdata/influxdb" + "github.com/influxdata/influxdb/bolt" ) var _ influxdb.SourceService = (*SourceService)(nil) @@ -96,6 +97,13 @@ func (s *SourceService) FindSources(ctx context.Context, opts influxdb.FindOptio return nil, 0, err } + // TODO(desa): this is a totaly hack and needs to be fixed. + // Specifically, we need to remove the concept of a default source. + if src.OrganizationID.String() == bolt.DefaultSourceOrganizationID { + sources = append(sources, src) + continue + } + if influxdb.ErrorCode(err) == influxdb.EUnauthorized { continue }