RA-1928: LoginPageController to handle URLs with one "/" only.#91
Merged
dkayiwa merged 9 commits intoopenmrs:masterfrom Jun 28, 2021
Merged
RA-1928: LoginPageController to handle URLs with one "/" only.#91dkayiwa merged 9 commits intoopenmrs:masterfrom
dkayiwa merged 9 commits intoopenmrs:masterfrom
Conversation
…lPath for the urlContextPath
Contributor
|
thanks @icrc-jfigueiredo you can also add the ticket id here |
mks-d
approved these changes
Jun 22, 2021
dkayiwa
reviewed
Jun 22, 2021
| when(Context.isAuthenticated()).thenReturn(true); | ||
| when(Context.getUserContext()).thenReturn(mock(UserContext.class)); | ||
|
|
||
| String redirectFullUrl = "http://openmrs.org/openmrs"; |
Member
There was a problem hiding this comment.
Are these variables or constants?
Contributor
Author
There was a problem hiding this comment.
Constants, I update according to the constants convention.
dkayiwa
reviewed
Jun 22, 2021
| */ | ||
| @Test | ||
| @Verifies(value = "should redirect user to home when user is authenticated if ? redirectUrl is for openrms, even if only have '/openrms'", method = "get(PageModel,UiUtils,PageRequest)") | ||
| public void get_shouldRedirectUserToHomeIfAuthenticatedAndPathForOpenmrsWasGivenOnUrl() throws Exception { |
Member
There was a problem hiding this comment.
Can we also improve the test method name?
Contributor
Author
There was a problem hiding this comment.
Hello @dkayiwa , absolutely, do you have some suggestions? maybe something like:
get_shouldRedirectUserToHomeIfAuthenticatedAndPathUrlAreInOpenmrsScope
get_shouldRedirectUserToHomeIfAuthenticatedAndUrlsForOpenmrs
Contributor
Author
There was a problem hiding this comment.
@dkayiwa i renamed it to get_shouldRedirectUserToHomeIfAuthenticatedAndURLPathAreInOpenmrsScope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RA-1928 If only contains one "/" character, it will use the entire urlPath for the urlContextPath
Issue: https://issues.openmrs.org/browse/RA-1928