From 5284857cb2f94bc347eb56c694d894283fc41703 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 20:45:32 +0100 Subject: protect authplain and current auth plugin --- lib/plugins/extension/helper/extension.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index be29f95d8..2a7119189 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -102,11 +102,15 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } /** - * If the extension is protected + * If the extension is protected against any modification (disable/uninstall) * * @return bool if the extension is protected */ public function isProtected() { + // never allow deinstalling the current auth plugin: + global $conf; + if ($this->id == $conf['authtype']) return true; + /** @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; $cascade = $plugin_controller->getCascade(); -- cgit v1.2.3