Merge pull request #11287 from influxdata/fix/default-source-org
fix(authorizer): allow default source orgID to be in the sources listpull/11269/head
commit
4863708c58
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue