Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login fix #222

Merged
merged 7 commits into from
Nov 20, 2018
Merged

Login fix #222

merged 7 commits into from
Nov 20, 2018

Conversation

hardl
Copy link
Contributor

@hardl hardl commented Nov 19, 2018

Changes proposed in this pull request:

  • Fixed issue with no nodes being visible if auth not being used

@jesusreal jesusreal self-assigned this Nov 20, 2018
@kwiatekus kwiatekus self-assigned this Nov 20, 2018
@jesusreal jesusreal added bug Something isn't working area/luigi labels Nov 20, 2018
@jesusreal jesusreal added this to the Sprint_Swinka_4 milestone Nov 20, 2018
Copy link
Contributor

@jesusreal jesusreal left a comment

Choose a reason for hiding this comment

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

This pr fixes the bug were navigation nodes are not displayed if authorization is disabled.
I have suggested removing code duplication and attached a proposal in form of a git patch. Please see my comment.


const isNodeAccessPermitted = (
nodeToCheckPermissionFor,
parentNode,
currentContext
) => {
if (!isLoggedIn()) return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see this already 3 times in our codebase, we could create a helper in LuigiConfig class and reuse it instead of duplicating code. Here my proposal.

Copy link
Contributor

Choose a reason for hiding this comment

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

Pushed by myself as requested from pr creator

@@ -52,10 +52,7 @@

export default {
oncreate() {
const idpProviderName = LuigiConfig.getConfigValue('auth.use');
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this is needed in the code executed below:

L82: idpProviderInstance = getIdpProviderInstance(idpProviderName, idpProviderSettings);

@kwiatekus kwiatekus merged commit c6acf88 into SAP:master Nov 20, 2018
@hardl hardl deleted the login-fix branch November 22, 2018 09:19
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
 fixed problem with node visibility w/o auth enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants