Feature No Code Attached Yet
avatar Open2logic
Open2logic
31 Aug 2022

Steps to reproduce the issue

Go to administration and disable all modules.
So in the Dashboard you will only see one box, the "Add Module to the Dashboard"
But if you click on "Add module", you will see a blank popup and you can't add any modules as they are all disabled
So why is the "Add Module to the Dashboard" box still displayed?
There is no way to disable the "Add Module to the Dashboard" box?
If we want to create a custom administration for a client, but we don't want them to see this feature, what do we do?

Expected result

We want to disable the box "Add Module to the Dashboard"

Actual result

"Add Module to the Dashboard" always visible, even when ALL modules to add in the administration have been disabled.

System information (as much as possible)

Joomla 4.X

Additional comments

The togle menu is also always active even if there is no option visible.

avatar Open2logic Open2logic - open - 31 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 31 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Aug 2022
avatar Open2logic Open2logic - change - 31 Aug 2022
The description was changed
avatar Open2logic Open2logic - edited - 31 Aug 2022
avatar Open2logic Open2logic - change - 31 Aug 2022
The description was changed
avatar Open2logic Open2logic - edited - 31 Aug 2022
avatar Open2logic Open2logic - change - 31 Aug 2022
The description was changed
avatar Open2logic Open2logic - edited - 31 Aug 2022
avatar brianteeman
brianteeman - comment - 31 Aug 2022

I'm sure you really meant to use a single ? instead of screaming!!!!

avatar brianteeman
brianteeman - comment - 31 Aug 2022

To do this you can either remove the create module permissions for the user (probably not a good idea) or create a template override for administrator\components\com_cpanel\tmpl\cpanel\default.php

image

avatar Open2logic
Open2logic - comment - 31 Aug 2022

Thanks Brian, I don't mean to yell.

What it indicates I think requires average knowledge and my proposal is an option so that this box can be disabled by people without code knowledge, I have it like this:

1 - In the back end of Joomla, go to System > Templates > Administrator Templates.
2 - Click on "Atum Details and Files".
3 - Navigate to the tab "Create Overrides".
4 - In the "components" list, click on the "com_cpanel" folder, then on "cpanel". You should get a message that says "Override created in /administrator/templates/atum/html/com_cpanel/cpanel".
5 - In the "Editor" tab, click through the folders html > com_cpanel > cpanel > default.php
6 - Scroll down in the editor until you see the line "authorise('core.create', 'com_modules')) : ?>"
7 - Replace that line with: authorise('core.manage', 'com_modules') && in_array(8,$user->groups)) : ?>
8 - Save & Close.

That line originally checks if the logged in user has the permission to manage modules. The updated line checks that AND also if the user is a Super User, and only will show the "add module" box to Super Users.

But I see in forums that many people want to disable that box with a simple click.
It could not be an improvement with an option in the global configuration or in the template configuration.

As I have indicated, I have solved it, but several people want to disable that box and do not know or are afraid to edit code.

Thanks

avatar brianteeman
brianteeman - comment - 31 Aug 2022

Personally speaking I see it as an advanced customisation

avatar chmst chmst - change - 31 Aug 2022
Labels Added: ?
avatar chmst chmst - labeled - 31 Aug 2022
avatar chmst
chmst - comment - 31 Aug 2022

Thanks for your suggestion, @Open2logic, it is surely worth being discussed. But please - could you change the title of your issue and use lower case without bangs?

avatar Open2logic Open2logic - change - 31 Aug 2022
Title
Add Module to the Dashboard - ALWAYS VISIBLE !!!!!
Add Module to the Dashboard - always visible !!!!!
avatar Open2logic Open2logic - edited - 31 Aug 2022
avatar Open2logic
Open2logic - comment - 31 Aug 2022

Thinking about it, I think Brian is right, when a custom administration is prepared for a client, the developer is the one who hides that box by delivering a clean, empty or adapted interface.

I have reviewed forums where there is talk about how to hide the box and certainly all those interested are developers, however they do not think of code rewriting, it seems that their first natural option is to look for how to disable the box among the options (they are familiar with this method), which indicates that if everything that is shown in the panel can be hidden with a click, this box should also have the possibility to activate or deactivate it from an option, simply because it is the generic methodology.

A charm of the Joomla administration is its flexibility to be easily customized, simply with html modules and hyperlinks you can present a very attractive and practical administration with icons style App to an end client, pity of the exception of the "add modules" box to the board"

avatar Open2logic Open2logic - change - 31 Aug 2022
Title
Add Module to the Dashboard - always visible !!!!!
Add Module to the Dashboard - always visible.
avatar Open2logic Open2logic - edited - 31 Aug 2022
avatar brianteeman
brianteeman - comment - 31 Aug 2022

Your code proposal is also not suitable as the permissions for modules are the same for both site AND administrator modules. The ACL does not differientate between them.

avatar Open2logic
Open2logic - comment - 31 Aug 2022

Woow thanks Brian.

avatar brianteeman
brianteeman - comment - 18 May 2024

I think this will be resolved using the acl changes in #42467 by @chmst

avatar Quy Quy - close - 6 Jul 2024
avatar Quy
Quy - comment - 6 Jul 2024

Closing as PR #42467 merged.

avatar Quy Quy - change - 6 Jul 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-07-06 18:05:58
Closed_By Quy
Labels Added: Feature
Removed: ?

Add a Comment

Login with GitHub to post a comment