From b401983cbedbfb420ff5c70ce90c879f0b2f743d Mon Sep 17 00:00:00 2001 From: Luke Morris Date: Fri, 10 Nov 2017 14:30:44 -0800 Subject: [PATCH] Scope auth logic beneath isUsingAuth --- ui/src/CheckSources.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ui/src/CheckSources.js b/ui/src/CheckSources.js index 5210d6f7c8..e3fbe19487 100644 --- a/ui/src/CheckSources.js +++ b/ui/src/CheckSources.js @@ -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
}