? Pending

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
1 Oct 2018

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

  1. Create a two menu items. One for Login Form and the other for User Profile.
    screenshot_20181001_225658

  2. Enable Modern Routing for com_users

  3. Go to login form /login and log in.

  4. After logged in you should be redirected to /profile

  5. Change 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

avatar csthomas csthomas - open - 1 Oct 2018
avatar csthomas csthomas - change - 1 Oct 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Oct 2018
Category Libraries
avatar csthomas csthomas - change - 2 Oct 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-10-02 08:24:55
Closed_By csthomas
Labels Added: ?
avatar csthomas
csthomas - comment - 2 Oct 2018

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.

avatar csthomas csthomas - close - 2 Oct 2018

Add a Comment

Login with GitHub to post a comment