RMDQ PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar krishnagandhicode
krishnagandhicode
4 Mar 2026

Pull Request resolves #46896

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Following the discussion in the issue, I implemented this by adding an optional <permissions> tag to the module xml.

Added <permissions>core.admin</permissions> to the xmls files for mod_latestactions, mod_privacy_dashboard, mod_privacy_status and for mod_messages added core.manage

updated SelectModel::getItems() in com_modules to parse this tag(and the optional asset) and unset the module from the list if $user->authorise() fails.


Updated: updated ModulesModel::translate() in com_modules. applied the same XML permission check to the main module managrr list.

Note : if the maintainers prefer not to introduce a new XML tag, I am happy to update this PR to use a hardcoded array in the Model instead. I appreciate any feedback on this architectural choice

Testing Instructions

Described in #46896

Actual result BEFORE applying this Pull Request

Restricted modules do appear in the list for standard administrators and cause confusion since they disappear from the dashboard after creation.

Expected result AFTER applying this Pull Request

Log in as the Administrator.
Go to Home Dashboard -> Add module to the dashboard button (+).
Result: "Action Log", "Privacy Dashboard", and "Privacy Status" are hidden from the list.
messages is still visbile because admins usually have core.manage access to com_messages.

Recording.2026-03-07.133747.mp4

Now test the new asset:

login in as super user.
Global Configuration -> messaging -> permissions
now change "Access Administration Interface" to Denied for the Administrator group.

now logout from super user and login again as administrator and check the module list and "Messages" is now hidden too.

After.PR.mp4

finally Log out and log back in as a Super User.
again go to Add module to the dashboard button.
Result: All four modules are visible and can be created.

Screenshot 2026-03-04 171926

Also by the last update now when you login in as admin and look for existing modules(system -> under manage -> administrator modules) you will not find the super user only modules there, which is available without the PR( without pr you can see, edit and trash those modules).

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar krishnagandhicode krishnagandhicode - open - 4 Mar 2026
avatar krishnagandhicode krishnagandhicode - change - 4 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Mar 2026
Category Administration com_modules Modules Front End Templates (site)
avatar krishnagandhicode krishnagandhicode - change - 4 Mar 2026
Title
Fix/46896 hide restricted modules
[5.4] Hide restricted admin modules from unauthorized users in selection list
avatar krishnagandhicode krishnagandhicode - edited - 4 Mar 2026
avatar krishnagandhicode krishnagandhicode - change - 4 Mar 2026
Labels Added: PR-5.4-dev
avatar joomla-cms-bot joomla-cms-bot - change - 4 Mar 2026
Category Administration com_modules Modules Front End Templates (site) Administration com_modules Modules
avatar krishnagandhicode krishnagandhicode - change - 4 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 4 Mar 2026
avatar hiteshm0
hiteshm0 - comment - 6 Mar 2026

@krishnagandhicode can you check if using core.admin inside the permission tag is the right approach for mod_messages ?? the dispatcher class for mod_messages is much more lenient
image

avatar ThomasFinnern ThomasFinnern - test_item - 6 Mar 2026 - Tested successfully
avatar ThomasFinnern
ThomasFinnern - comment - 6 Mar 2026

I have tested this item ✅ successfully on b10307a

After applying the PR the "Action logs module" was only visible for super administrators
Found by clicking on Home->Add module to the dashboard on the bottom


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

avatar exlemor exlemor - test_item - 7 Mar 2026 - Tested successfully
avatar exlemor
exlemor - comment - 7 Mar 2026

I have tested this item ✅ successfully on b10307a

I have tested this successfully! Thanks @krishnagandhicode!


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

avatar hiteshm0 hiteshm0 - test_item - 7 Mar 2026 - Tested unsuccessfully
avatar hiteshm0
hiteshm0 - comment - 7 Mar 2026

I have tested this item 🔴 unsuccessfully on b10307a

after applying this patch:
When trying to create a new module (as a user in the administrator user group), the module 'messages' is hidden.
But according to the dispatcher class of this module it is visible to an administrator.

Filtering based on component specific permission should also be implemented (currently it is only global) and this will fix the problem with the module 'messages'


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

avatar krishnagandhicode
krishnagandhicode - comment - 7 Mar 2026

Thank you for testing and catching that, will update the PR v soon.

avatar krishnagandhicode krishnagandhicode - change - 7 Mar 2026
Labels Added: RMDQ
avatar krishnagandhicode krishnagandhicode - change - 7 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 7 Mar 2026
avatar krishnagandhicode krishnagandhicode - change - 7 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 7 Mar 2026
avatar krishnagandhicode
krishnagandhicode - comment - 7 Mar 2026

I have updated the PR description and testing instructions(Mainly the After Applying patch part).
PR is ready for human test again.

avatar richard67
richard67 - comment - 7 Mar 2026

Note : if the maintainers prefer not to introduce a new XML tag, I am happy to update this PR to use a hardcoded array in the Model instead. I appreciate any feedback on this architectural choice

@krishnagandhicode We (maintainers) will discuss that and come back to you with a result hopefully Wednesday next week. Introducing a new XML tag could also mean that it counts as a new feature. As 6.1 had already feature freeze with their 6.1.0-beta1, that would mean the PR would have to be rebased to 6.2-dev. But wait with that until we have discussed it.

Of course people can already test this PR. Worst case is that it will need new tests when it needs some code change.

avatar hiteshm0
hiteshm0 - comment - 7 Mar 2026

@krishnagandhicode looks good 👍 , i will formally test this after the maintainers opinion

avatar brianteeman
brianteeman - comment - 7 Mar 2026

from your comment on the issue am I to understand that this only prevents a non-super user creating a new instance of a module and that they can still edit an existing module that has ths restriction? If so then this isnt a good solution

avatar krishnagandhicode
krishnagandhicode - comment - 8 Mar 2026

@brianteeman, @hiteshm0 you are right. I just checked it locally, a administrator can indeed see , edit, and trash an existing "Action Log" module from the main manager list.

Brian currently this Pr only patches 'SelectModel' to filter the creation list - which was the original scope of the issue.
But seeing this UX inconsistenncy, should I expand the PR to also filter these restricted modules out of ModulesModel -the main management list ? (if that's doesn't block admins from doing things they are actually supposed to do ?)

avatar brianteeman
brianteeman - comment - 8 Mar 2026

Welcome to the world of contributing to Joomla as opposed to fixing something for an individual web site. There is always more to consider than the limited scope defined in the bug report.

avatar brianteeman
brianteeman - comment - 8 Mar 2026

I have proposed an alternative approach #47331

avatar krishnagandhicode
krishnagandhicode - comment - 9 Mar 2026

I have updated(expanded) the PR, now if a user lacks the dispatcher permission(admin) then the restricted modules will be strictly not accessible (either exiting moduls or creating new modules).

About the confusion for super user being able to give access to super user only modules to admin - that form is generic in everycase - so yes adding that text to these modules could be a good solution to handle that as well (but only adding that text and still allowing admin to see, edit and trash the exiting modules does not seem to be good user experinece to me)

I believe a hybrid approach using both the PRs(this and #47331) would be a good solution.

I am not so experienced with Joomla ( I am learning) - If I have understood something wrong please correct me.

avatar krishnagandhicode krishnagandhicode - change - 9 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 9 Mar 2026
avatar krishnagandhicode krishnagandhicode - change - 9 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 9 Mar 2026
avatar brianteeman
brianteeman - comment - 9 Mar 2026

I believe a hybrid approach using both the PRs(this and #47331) would be a good solution.

While my personal opinion is that the "hiding" of modules is not a good idea I do agree with you that this PR would benefit from the additional information provided in my PR

Add a Comment

Login with GitHub to post a comment