? Pending

User tests: Successful: Unsuccessful:

avatar sanderpotjer
sanderpotjer
2 Sep 2017

Pull Request for Issue #17188

Summary of Changes

Fixing the allowEdit in the module controller. Currently using the component permissions as a fallback, even while a ID is set to edit. Due to this, editing a module is allowed when the edit permission is denied for the module specifically but allowed for com_modules.

The controller only should use the component permissions if the module ID is not set.

Testing Instructions

  • Create a new user group Module Test
  • Assign this user group to access level Special
  • Allow the backend login action for the Module Test user group in the Global Configuration permissions
  • Allow Access Administration Interface and Edit action for both Menu & Module component permissions for the Module Test user group.
  • Open the module that displays one of your menu's, eg the Main Menu. Set Edit action permission to denied for the Module Test user group
  • Create a test user, assign to Module Test user group
  • Login with test user
  • Go to Menus -> Manage, and click on the module title under the Linked Modules column of the menu module you just denied action for

Actual result

A modal shows up, containing the module you can edit. Check under the module manager that you can't edit the module over there.

Expected result

Apply the patch, now the module shows up, but with a list of modules and the error message Edit not permitted.

avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2017
Category Administration com_modules
avatar sanderpotjer sanderpotjer - open - 2 Sep 2017
avatar sanderpotjer sanderpotjer - change - 2 Sep 2017
Status New Pending
avatar brianteeman
brianteeman - comment - 3 Sep 2017

@sanderpotjer thank you for the detailed test instructions. With them I was able to replicate the issue and test your PR.

Instead of

a list of modules and the error message Edit not permitted.

would it be possible to just disable/remove the link to the module - i think that would be a cleaner experience?

avatar sanderpotjer
sanderpotjer - comment - 3 Sep 2017

@brianteeman I fully agree. But disabling the link to the module is not a real fix for the ACL issue in theallowEdit of the Module controller that could also happen in other places where the module is loaded in a modal. So I thought it would be better to have a separately PR for disabling the modules that you can't edit (won't hide it, as at the moment we tend to disable links rather than hiding them). That PR is coming 😄

avatar brianteeman brianteeman - test_item - 3 Sep 2017 - Tested successfully
avatar brianteeman
brianteeman - comment - 3 Sep 2017

I have tested this item ✅ successfully on 237ce61


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

avatar sanderpotjer
sanderpotjer - comment - 3 Sep 2017

@brianteeman thanks for testing, created a new PR for disabling the linked module: #17845


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 3 Sep 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Sep 2017

I have tested this item ✅ successfully on 237ce61


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Sep 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Sep 2017

RTC after two successful tests.

avatar ggppdk ggppdk - test_item - 3 Sep 2017 - Tested successfully
avatar ggppdk
ggppdk - comment - 3 Sep 2017

I have tested this item ✅ successfully on 237ce61

I was going to test sooner but it was too late last night, i have done code review on this it is correct


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

avatar mbabker mbabker - change - 3 Sep 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-09-03 16:34:07
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 3 Sep 2017
avatar mbabker mbabker - merge - 3 Sep 2017

Add a Comment

Login with GitHub to post a comment