Is it possible to allow admin users on a site to download and install modules through the project installer, while turning off the ability to manually install modules or theme.
We would like to be able to host a site for a client and give them wide access to all projects available through BackdropCMS.org, but block the direct upload of modules or the ability to load a module through a link (options 2 and 3 in screenshot).
![](/files/inline-images/image_345.png)
The solution for this problem would have to be a setting in settings.php or something on the server, since we would want to prevent even full admins from adding a custom module.
I suppose another solution might be a custom module that prevents the installation of other custom modules through the UI.
Comments
I think this would need to be a small custom module using
hook_form_FORM_ID_alter
to alterinstaller_manager_install_form
I think you would also want to make this module so it can't be disabled in the UI. Probably
required = TRUE
in the .info file would be the most suitable.Will you be user 1? Or do you also need to block for user 1?
@martin. Basically, your suggestion is to use hook_form_alter in a custom module to remove these options from the form and then make it impossible for a user to disable the module that does this. Did I get that right?
In my ideal situation, I would like to be able to block access to this feature for user #1. However, I might be able to get around that requirement.
I wonder how one might also create a list of modules available on Backdropcms.org that could not be downloaded through the project browser.
I don't have any specific ones in mind, but I'm thinking of something like the php module, which is not available on backdropcms.org, but what if a module like that were available and I wanted to block access to that specific module?
Yes. That was my idea.
I think the user #1 shouldn't be too difficult; I did this in the Enforce Revision Logs module.
Preventing certain modules that are available in the browser from being installed looks trickier though; the links to add to the queue are part of the system page and I can't see any hooks around the page or queue that you could use. A greater mind than mine might know of a way to do this.
This sounds a bit like Joseph's idea of allowing a curated list of modules that users can install.
Yes, it is a bit like this. Except that I think Joseph is looking to allow a few modules and exclude most modules. I'm looking to potentially include most modules and exclude a few of them.
:-)