summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2013-04-25 16:43:54 +0200
committerAndreas Gohr <gohr@cosmocode.de>2013-04-25 16:43:54 +0200
commita154806fb54c04841a42641bf5d66716d89c1554 (patch)
tree9f046eb2de0cc89cb850c7cb55ba53ac3f5c156a /lib
parent8257d713a47c1819c2c33ddd2b868eea62d9f6fc (diff)
downloadrpg-a154806fb54c04841a42641bf5d66716d89c1554.tar.gz
rpg-a154806fb54c04841a42641bf5d66716d89c1554.tar.bz2
authad: capabilities depend on userdomain specific config
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/authad/auth.php13
1 files changed, 13 insertions, 0 deletions
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
@@ -111,6 +111,19 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
}
/**
+ * 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]
*
* Checks if the given user exists and the given