joomla-cms
joomla-cms copied to clipboard
[4.4] Set permission for add-module-to-dashboard button
Pull Request for Issue #41624 .
PR #37268 set wrong permission for the "Add module to dahboard" Button on cpanel. This was caused because a user had a special use case - descibed in https://github.com/joomla/joomla-cms/issues/37267
Summary of Changes
This PR sets the permission back to core.manage on com_modules.
Therefore the issue https://github.com/joomla/joomla-cms/issues/37267 is unresolved again. This special use case needs an other solution. Maybe an override of cpanel.
Testing Instructions
You need a user in usergroup manager. Login as manager - you see the button "Add Module to the dashboard". Activate. An Error message is displayed.
Apply the patch - no button for usergroup "manager".
Link to documentations
Please select:
-
[ ] Documentation link for docs.joomla.org:
-
[x] No documentation changes for docs.joomla.org needed
-
[ ] Pull Request link for manual.joomla.org:
-
[x] No documentation changes for manual.joomla.org needed
Could you explain what the problem is as it is not clear from your post
Users in group "manager"" are not allowed to work on com_modules. log in as manager and the Menu (content) is:
If the user now activates the button and has not the permission, it gives an error.
Therefore the issue https://github.com/joomla/joomla-cms/issues/37267 is unresolved again.
resolved now also for this case.
I have tested this item :white_check_mark: successfully on 2eef0188894b81e0928727ab3718da34dcb25af3
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42467.
In the case of #37267 will still work fine and no need any change after apply this PR
@chmst delete from summary at least this part: "This PR sets the permission back to core.manage on com_modules."
I have tested this item :red_circle: unsuccessfully on 2eef0188894b81e0928727ab3718da34dcb25af3
With this PR at this point all users in the usergroup "Administrator"
see not the "Add Module to the dashboard" button.
No button for usergroup "Administrator" only for "Super Users".
Alternative i have test it with:
<?php if (($user->authorise('core.admin', 'com_modules')) and ($user->authorise('core.create', 'com_modules'))) : ?>
This works for me as aspected.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42467.
I have tested this item :white_check_mark: successfully on 39a1c855ee118007703a1b71c463ce8ac49915a0
Works as aspected.
@chmst delete from summary at least this part: "This PR sets the permission back to core.manage on com_modules."
or alternatively change it to: ~~This PR sets the permission back to core.manage on com_modules.~~
@carlitorweb : Now we need a second test.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42467.
I have tested this item :white_check_mark: successfully on 39a1c855ee118007703a1b71c463ce8ac49915a0
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42467.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42467.
Thank you!