[dokuwiki] Re: [patch] Farming: Prohibit the installation of plugins through animals

  • From: Frank Thommen <list.dokuwiki@xxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 24 Sep 2013 11:33:34 +0200

Hi Michael,

On 24.09.13 11:12, Michael Hamann wrote:
Hi,

On 11.09.13 18:13, Frank Thommen wrote:

On 10.09.13 18:42, Frank Thommen wrote:
[...]  In a farming setup I need to limit the plugin
installation to the farmer administrator.  [...]

[...]
May I suggest the attached patch (or similar) [...]
so that plugins can't
be (de)installed by Animal administrators if $conf['isAnimal'] is true
and $conf['animalscaninstallplugins'] is false.

The configuration option $conf['isAnimal'] isn't needed, the constant
DOKU_FARM is already set to false when no animal is selected. There is

OK. So far I had only checked for the variable to be /defined/, not the /value/ itself. My bad.


also a configuration option named 'pluginmanager' that disables the
plugin manager when it is set to false, however that configuration
option is broken in the current stable version but it is already fixed
in the current development version.

I know, but this is not an option for my use case. I don't want to disable the plugin manager completely, only the installation/deinstallation of plugins and some specific configuration settings. $conf['pluginmanager'] is too general for my purpose.


Concerning the feature to disable plugin installation in the plugin
manager I would rather introduce a setting like "Disable plugin
installation" in the plugin manager (i.e. not a global setting and not
farm-specific).

Seems a good and even more flexible solution to me. One could then set this to true and have it in conf/local.protected.php for all (or selected) animals.


As the current plugin manager will (most probably) be
replaced by the new extension manager from
https://github.com/splitbrain/dokuwiki/pull/284 after the next release
(we're currently in feature freeze) I think it makes more sense to
implement this in the new extension manager. The same applies to the
feature to install plugins disabled, I think this should automatically
work when you take the plugin list from the farmer as default for the
animals and disable the plugins in the farmer.

I'll give it a try.  Thanks for the hint


2013/9/24 Frank Thommen <list.dokuwiki@xxxxxxxxxx>:
[...]

I'm basically interested in knowing if you consider introducing such a
feature into DokuWiki or if that's not planned at all.

In general we don't have fixed plans what we'll introduce or not apart
from some long-term projects like the new extension manager. The main
development discussion currently happens in pull requests on GitHub
[...]

I've seen, that github pull requests are the favored way for proposing changes. Unfortunately all I currently use from git is pull/add/commit/push. Using branches & Co. will require quite some additional reading/learning from my side. So the maillist was simply the faster channel. :-)



I'm currently also trying to find a way to control this feature from the
Farmer's Admin panel.

As there are a lot of different farm setups I'm not sure that's really
possible but there could be of course some "farm configuration
manager" which gets some paths/path templates where it can find the
animal/farmer configuration and then allow to set configuration option
in the various configuration files. I think this should be implemented
in a separate plugin that won't be bundled in DokuWiki.

Since DW offers its own built-in farming setup I'd rather see this as an integral part of DW, unless the complete DW farming setup is moved into an plugin itself.


Cheers and thanks for the explanations
frank
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: