-
Notifications
You must be signed in to change notification settings - Fork 174
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
Login fix #222
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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);
fixed problem with node visibility w/o auth enabled
Changes proposed in this pull request: