summaryrefslogtreecommitdiffstats
path: root/lib/kolab_api_controller.php
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-14 16:28:13 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-14 16:28:13 +0100
commit942f537ac18b13dbc18d11c0a5453aef68f533c3 (patch)
treedfecec2f8f345305b2a46d9610322e7f9ea08f4b /lib/kolab_api_controller.php
parent0240253fff45a7fbc9c5ff990cab69938dd3cc20 (diff)
downloadwebadmin-942f537ac18b13dbc18d11c0a5453aef68f533c3.tar.gz
Fix domains with aliases mixing up the capabilities return
Diffstat (limited to 'lib/kolab_api_controller.php')
-rw-r--r--lib/kolab_api_controller.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/kolab_api_controller.php b/lib/kolab_api_controller.php
index 3530083..5fbe099 100644
--- a/lib/kolab_api_controller.php
+++ b/lib/kolab_api_controller.php
@@ -308,11 +308,13 @@ class kolab_api_controller
$this->domains[] = $_SESSION['user']->get_domain();
}
+ //console("\$this->domains:", $this->domains);
+
// add capabilities of all registered services
foreach ($this->domains as $domain) {
// TODO: 'associateddomain' is very specific to 389ds based deployments, and this
// is supposed to be very generic.
- $domain_name = is_array($domain) ? $domain['associateddomain'] : $domain;
+ $domain_name = is_array($domain) ? (is_array($domain['associateddomain']) ? $domain['associateddomain'][0] : $domain['associateddomain']) : $domain;
// define our very own capabilities
$actions = array(
'system.quit' => array('type' => 'w'),
@@ -326,6 +328,8 @@ class kolab_api_controller
}
}
+ //console("api capabilities", $domain, $domain_name);
+
$result[$domain_name] = array('actions' => $actions);
}