-
Notifications
You must be signed in to change notification settings - Fork 394
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
#9251: Better handle of context access restriction #9298
#9251: Better handle of context access restriction #9298
Conversation
You have to solve conflicts @dsuren1 |
Yes, permalink commit causing it |
@offtherailz I have resolved the conflicts. PR is ready for review now. Thanks! |
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.
Hi,
in general I think that the redirect logic is not needed at the moment in mapstore because:
- geOrchestra has a custom login plugin, hidden that handles the logic of login) and anyway their CAS can not redirect to the correct page.
- here in mapstore we don't have the login redirect but only
openID
orbasic
.
If it is anyway needed for some reason, I should use the existing authenticationProviders
logic, instead of adding custom logic to this special case. So I should remove for sure the loginPage
from misc settings, at least if needed use the existing logic.
For the redirect to the home page, I should centralize the logic in a unique action, instead of getting the homePage here and there.
@@ -17,3 +20,8 @@ export function goToPage(page, router) { | |||
page | |||
}; | |||
} | |||
|
|||
export function goToHomePage() { | |||
const homePath = ConfigUtils.getMiscSetting('homePath', '/'); |
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.
can we use the goToPage action instead of push?
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.
In that case, we may need to pass router as a param from every place we trigger it. And GO_TO_PAGE
doesn't perform any sideeffect
This looks ok for me. Just to be sure @allyoucanmap what do you think about these changes in the geonode context? |
@ElenaGallo, could you please test this on DEV ? Thank you @dsuren1 anyway I don't think we have something really to test here, while it should be on geOrchestra |
Description
This PR enhances the context access restriction scenario with proper error message and redirection if configured.
Update: This configuration is not valid and agreed to keep design simple by coding redirect logic in the respective project and is not needed at the moment in mapstore ref: #9298 (review)
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
What is the new behavior?
On context load error
/
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information