summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-09-22 13:15:16 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-09-22 13:15:16 +0200
commit81681b2072d6939d79e5032dc0ace8ea85cf2bba (patch)
tree95839f490a09451e4ffc5b52e36e0d0fbe4b022c
parent5dca5b788ac8015c84ec41c8d2117f61290f1129 (diff)
downloadwebadmin-81681b2072d6939d79e5032dc0ace8ea85cf2bba.tar.gz
Take in, parse and treat a parameter 'domainrelatedobject_only' correctly.kolab-webadmin-3.2.9
-rw-r--r--lib/Auth/LDAP.php10
-rw-r--r--lib/api/kolab_api_service_domain_types.php3
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index bd7c3f9..29fd3e1 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -165,6 +165,13 @@ class LDAP extends Net_LDAP3 {
$service_bind_dn = $this->conf->get('ldap', 'service_bind_dn');
$primary_domain = $this->conf->get('kolab', 'primary_domain');
+ if (!empty($attributes['domainrelatedobject_only'])) {
+ $domainrelatedobject_only = (bool)($attributes['domainrelatedobject_only']);
+ unset($attributes['domainrelatedobject_only']);
+ } else {
+ $domainrelatedobject_only = false;
+ }
+
if (empty($service_bind_dn)) {
$service_bind_dn = $this->conf->get('ldap', 'bind_dn');
}
@@ -202,7 +209,8 @@ class LDAP extends Net_LDAP3 {
return false;
}
- if (!empty($attributes['domainrelatedobject_only'])) {
+ // Return if the request specified to only create the domainrelatedobject
+ if ($domainrelatedobject_only) {
return true;
}
diff --git a/lib/api/kolab_api_service_domain_types.php b/lib/api/kolab_api_service_domain_types.php
index 189b39f..487faeb 100644
--- a/lib/api/kolab_api_service_domain_types.php
+++ b/lib/api/kolab_api_service_domain_types.php
@@ -34,6 +34,9 @@ class kolab_api_service_domain_types extends kolab_api_service
'associateddomain' => array(
'type' => 'list'
),
+ 'domainrelatedobject_only' => array(
+ 'optional' => true,
+ ),
'inetdomainbasedn' => array(
'optional' => true,
),