Closed
Conversation
Contributor
Author
|
This PR has not passed unit tests. The solution could be: if (get_class($this->router->menu) === 'Joomla\CMS\Menu\SiteMenu')
{
$attributes[] = 'access';
$values[] = null;
}but it does not look good. |
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.
Summary of Changes
Generate a correct link to the restricted page, even you have no access yet.
This PR prevents duplicate links when you are logged in or not.
Testing Instructions
Create a two menu items. One for

Login Formand the other forUser Profile.Enable Modern Routing for
com_usersGo to login form
/loginand log in.After logged in you should be redirected to
/profileChange access level from Public to Registered for User Profile menu item (
/profile)Note: to clear old return URL (if you tested patched version first, after logged in, you should go to the other page (ex. home page) and logout. Next, back to the login page again). If this does not help then clear cookies.
Actual result
After logout and log in again you are redirected to
/login?view=profile. If not then see at the note above.Expected result
After logout and log in again you should be redirected to
/profile.Documentation Changes Required
No