Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Conversation

@n-riesco
Copy link
Contributor

@n-riesco n-riesco commented Aug 2, 2018

@n-riesco n-riesco requested a review from tarzzz August 2, 2018 16:15
// If not logged in and on-promise private-mode, redirect to login page
const plotlyAuthToken = req.cookies['plotly-auth-token'];
const onprem = getSetting('IS_RUNNING_INSIDE_ON_PREM');
if (path === '/' && !plotlyAuthToken && onprem) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also redirect to login when "private mode" is not enabled which we do not want.

We should be checking for "AUTH_ENABLED" setting for the redirects..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github doesn't show it in the diff, but see that we have checked AUTH_ENABLED in the lines above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for the info.

We should still redirect to /external-data-connector/login instead of just /login ..

Copy link
Contributor

@tarzzz tarzzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be checking for "AUTH_ENABLED" setting for the redirect to "/login"..

@n-riesco
Copy link
Contributor Author

n-riesco commented Aug 2, 2018

@tarzzz I've updated the redirection as advised on Slack. Thanks!

@tarzzz
Copy link
Contributor

tarzzz commented Aug 3, 2018

  • Tested in onprem (both private and non-private mode).

💃 ..

@n-riesco n-riesco merged commit 0a1d8c4 into master Aug 3, 2018
@n-riesco n-riesco deleted the onprem/fix-private-mode branch August 29, 2018 15:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants