Merge pull request #2349 from influxdata/multitenancy_allow-entry-without-auth
Scope auth logic beneath isUsingAuthpull/10616/head
commit
b6616fc177
|
@ -150,18 +150,12 @@ const CheckSources = React.createClass({
|
||||||
const {
|
const {
|
||||||
params,
|
params,
|
||||||
sources,
|
sources,
|
||||||
auth: {isUsingAuth, me, me: {currentOrganization}},
|
auth: {isUsingAuth, me: {currentOrganization}},
|
||||||
} = this.props
|
} = this.props
|
||||||
const {isFetching} = this.state
|
const {isFetching} = this.state
|
||||||
const source = sources.find(s => s.id === params.sourceID)
|
const source = sources.find(s => s.id === params.sourceID)
|
||||||
|
|
||||||
if (
|
if (isFetching || !source || (isUsingAuth && !currentOrganization)) {
|
||||||
isFetching ||
|
|
||||||
!source ||
|
|
||||||
typeof isUsingAuth !== 'boolean' ||
|
|
||||||
(me && me.role === undefined) || // TODO: not sure this happens
|
|
||||||
!currentOrganization
|
|
||||||
) {
|
|
||||||
return <div className="page-spinner" />
|
return <div className="page-spinner" />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue