From a154806fb54c04841a42641bf5d66716d89c1554 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <gohr@cosmocode.de> Date: Thu, 25 Apr 2013 16:43:54 +0200 Subject: [PATCH] authad: capabilities depend on userdomain specific config --- inc/html.php | 2 ++ lib/plugins/authad/auth.php | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/inc/html.php b/inc/html.php index fb39fcb3c..3bef75eab 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1352,6 +1352,8 @@ function html_updateprofile(){ /** @var auth_basic $auth */ global $auth; + var_dump($auth); + print p_locale_xhtml('updateprofile'); $fullname = $INPUT->post->str('fullname', $INFO['userinfo']['name'], true); diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 5d5f532b6..b6b5dd268 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -110,6 +110,19 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $this->cando['modMail'] = true; } + /** + * Load domain config on capability check + * + * @param string $cap + * @return bool + */ + public function canDo($cap) { + //capabilities depend on config, which may change depending on domain + $domain = $this->_userDomain($_SERVER['REMOTE_USER']); + $this->_loadServerConfig($domain); + return parent::canDo($cap); + } + /** * Check user+password [required auth function] * -- GitLab