User tests: Successful: Unsuccessful:
This pull request allows to set permissions per module in the Joomla Module Manager. So besides configuring the com_modules general permissions you can configure the permissions per module.
You can use this for example to:
This patch doesn't include the SQL changes for all sample data sets yet. I am working on that but would suggest to review the code meanwhile.
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28638
Testers are much welcome, let me know if you have any questions / feedback. Thanks in advance!
For those interested in testing (thank you!) I have created testing instructions. If you have a fresh Joomla installation with the ACL permissions per module patch applied I would suggest the following steps:
Above are several examples listed of tests you can perform on this new feature. Please go ahead and try other permission setting combinations as well. Like: not allowing the create action in the Module Manager settings, and only the actions for a couple modules instead.
Thanks, Sander
Based on the feedback of the testers in the tracker item (http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28638) I have updated the pull request.
The module dropdown now respects the Module ACL settings as well. While this is not in line with the behaviour of the article manager I agree that it is better if the dropdown respects the ACL settings. So in the updated pull request the dropdown is only visible if a user is allowed to edit or edit state the module, and the items shown in the dropdown are also based on the allowed actions.
Please have a look at this and let me know if you like this better. If you think it is better I will make a pull request for the Article Manager as well.
Changes: sanderpotjer@9c52ef5
One of the other comments made a couple times is that it confusing that the "Save as new" button is visible when edit is not allowed. This is actually correct behaviour. To prevent that and hide that button you need to deny the "Create" action for the Module Manager permissions (step 4 in the testing instructions).
As Brian mentioned when you edit a module while you are denied for the "edit state" action you can click on the Published/Ubpublished/Trashed buttons, but the changes are not saved (which is good). Better would be if the user can't click those buttons at all. At the moment there is no support for a "disabled" state for this type of buttons. In the article manager a dropdown is used which will be disabled when you can't change the state.
I think there are two options to solve this:
1) Use the article way of presenting the Published/Ubpublished/Trashed state, so a dropdown which can be disabled when you can't change the state.
2) Simply hide the Status buttons at all if you are not allowed to change the state.
You're opinions on this are much welcome. Thanks!
I have synced the pull request with the latest master.
Due to UX changes the module dropdown doesn't respect ACL at the moment, but is in line with the article manager. I will create a separate pull request to make sure the dropdown respects the ACL permissions for the article manager, module manager, etc...
For those interested in testing (thank you!) I have added testing instructions to the description.