joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[4.4] Set permission for add-module-to-dashboard button

Open chmst opened this issue 1 year ago • 8 comments

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

chmst avatar Dec 05 '23 12:12 chmst

Could you explain what the problem is as it is not clear from your post

brianteeman avatar Dec 05 '23 13:12 brianteeman

Users in group "manager"" are not allowed to work on com_modules. log in as manager and the Menu (content) is: grafik

If the user now activates the button and has not the permission, it gives an error. grafik

grafik

chmst avatar Dec 05 '23 13:12 chmst

Therefore the issue https://github.com/joomla/joomla-cms/issues/37267 is unresolved again.

resolved now also for this case.

chmst avatar Apr 09 '24 14:04 chmst

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.

carlitorweb avatar Apr 21 '24 16:04 carlitorweb

In the case of #37267 will still work fine and no need any change after apply this PR

carlitorweb avatar Apr 21 '24 16:04 carlitorweb

@chmst delete from summary at least this part: "This PR sets the permission back to core.manage on com_modules."

carlitorweb avatar Apr 21 '24 17:04 carlitorweb

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.

Sieger66 avatar May 01 '24 15:05 Sieger66

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.

Sieger66 avatar May 12 '24 17:05 Sieger66

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.

viocassel avatar May 26 '24 11:05 viocassel

RTC


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

richard67 avatar May 26 '24 14:05 richard67

Thank you!

MacJoom avatar Jun 27 '24 09:06 MacJoom