? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
8 Nov 2016

Summary of Changes

When we create a menu item without selecting a menu first, ie, we are in "All Menus Item" view and press New to create a new menu item, the core.edit.state ACL check is not correct because we don't have a menutype id.

So this PR makes it use com_menus asset in this case.

Testing Instructions

Mainly code review. But you can also:

  1. Use latest staging and apply patch
  2. Create a user in Administrator group
  3. Go to com_menus permissions and disable core.edit.state for Administrator
  4. Login with Administrator user
  5. Go to "All Menu items" view
  6. Click New for creating a new menu item and check the published field is disabled

Documentation Changes Required

None.

avatar andrepereiradasilva andrepereiradasilva - open - 8 Nov 2016
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Nov 2016
Category Administration Components
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
Title
[ACL] [com_menus item edit view] Correct check when "All Menus" is selected
[ACL] [com_menus item edit view] Correct check when "All Menu Items" is selected
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - edited - 8 Nov 2016
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
Title
[ACL] [com_menus item edit view] Correct check when "All Menus" is selected
[ACL] [com_menus item edit view] Correct check when "All Menu Items" is selected
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
Title
[ACL] [com_menus item edit view] Correct check when "All Menu Items" is selected
[ACL] [com_menus item edit view] Correct check on new with "All Menu Items" selected
avatar andrepereiradasilva andrepereiradasilva - edited - 8 Nov 2016
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
Title
[ACL] [com_menus item edit view] Correct check when "All Menu Items" is selected
[ACL] [com_menus item edit view] Correct check on new with "All Menu Items" selected
avatar jeckodevelopment
jeckodevelopment - comment - 8 Nov 2016

But, even if the state is on "published" you have to specify:

  • Menu title
  • Menu item type
  • Menu
avatar andrepereiradasilva
andrepereiradasilva - comment - 8 Nov 2016

don't understand your comment

avatar andrepereiradasilva
andrepereiradasilva - comment - 8 Nov 2016

The thing is in this case the core is making an ACL check like this:

JFactory::getUser()->authorise('core.edit.state', 'com_menus.menu.0');

This is obvious wrong because you don't have never a menutype with id 0, so you don't have asset with that name.

avatar jeckodevelopment
jeckodevelopment - comment - 8 Nov 2016

ok, thanks!

avatar ggppdk ggppdk - test_item - 8 Nov 2016 - Tested successfully
avatar ggppdk
ggppdk - comment - 8 Nov 2016

I have tested this item successfully on d0cbc51

The correct asset of the correct menu is checked for existing menu items, and for new menu items when a menu is selected
e.g. 'com_menus.menu.6'

  • so this is working correctly, as it was working before

For new menu item while we are at "All menus" (what this PR fixes)
the asset that is checked (for core.edit.state) is now 'com_menus'

avatar infograf768
infograf768 - comment - 8 Nov 2016

I have tested this item successfully on d0cbc51


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12825.

avatar infograf768 infograf768 - test_item - 8 Nov 2016 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 8 Nov 2016
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 8 Nov 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12825.

avatar roland-d roland-d - change - 13 Nov 2016
Milestone Added:
avatar roland-d roland-d - close - 13 Nov 2016
avatar roland-d roland-d - merge - 13 Nov 2016
avatar roland-d roland-d - reference | 631501d - 13 Nov 16
avatar roland-d roland-d - merge - 13 Nov 2016
avatar roland-d roland-d - close - 13 Nov 2016
avatar roland-d roland-d - change - 13 Nov 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-11-13 06:17:56
Closed_By roland-d
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2016
Category Administration Components Administration com_menus Components

Add a Comment

Login with GitHub to post a comment