Merge pull request #2349 from influxdata/multitenancy_allow-entry-without-auth

Scope auth logic beneath isUsingAuth
pull/10616/head
lukevmorris 2017-11-10 17:45:56 -08:00 committed by GitHub
commit b6616fc177
1 changed files with 2 additions and 8 deletions

View File

@ -150,18 +150,12 @@ const CheckSources = React.createClass({
const {
params,
sources,
auth: {isUsingAuth, me, me: {currentOrganization}},
auth: {isUsingAuth, me: {currentOrganization}},
} = this.props
const {isFetching} = this.state
const source = sources.find(s => s.id === params.sourceID)
if (
isFetching ||
!source ||
typeof isUsingAuth !== 'boolean' ||
(me && me.role === undefined) || // TODO: not sure this happens
!currentOrganization
) {
if (isFetching || !source || (isUsingAuth && !currentOrganization)) {
return <div className="page-spinner" />
}