summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2015-03-06 08:46:20 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2015-03-06 08:46:20 (GMT)
commit8d180afa12bc87be916f96a13c2cdd6bde673242 (patch)
tree3313f7785225ed1c42eeaf5d9a8bb64865594e19
parent56a0b8eb70e4567ca7f973409321a031297f96a6 (diff)
downloadkolab-wap-8d180afa12bc87be916f96a13c2cdd6bde673242.tar.gz
Fix issues related to "cn=Directory Manager" login case-insensitivity (#4804)
-rw-r--r--lib/User.php2
-rw-r--r--lib/api/kolab_api_service_type.php2
-rw-r--r--lib/kolab_api_controller.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/User.php b/lib/User.php
index a248e57..97b1e78 100644
--- a/lib/User.php
+++ b/lib/User.php
@@ -54,7 +54,7 @@ class User
$this->domain = empty($domain) ? $this->auth->domain : $domain;
// set unique attribute value as userid
- if ($this->userid != 'cn=Directory Manager') {
+ if (strtolower($this->userid) != 'cn=directory manager') {
$unique_attr = kolab_api_service::unique_attribute();
if ($attributes && $attributes[$unique_attr]) {
diff --git a/lib/api/kolab_api_service_type.php b/lib/api/kolab_api_service_type.php
index 09bbc8c..0089589 100644
--- a/lib/api/kolab_api_service_type.php
+++ b/lib/api/kolab_api_service_type.php
@@ -221,7 +221,7 @@ class kolab_api_service_type extends kolab_api_service
{
$effective_rights = array();
// @TODO: set rights according to user group or sth
- if ($_SESSION['user']->get_userid() == 'cn=Directory Manager') {
+ if (strtolower($_SESSION['user']->get_userid()) == 'cn=directory manager') {
$attr_acl = array('read', 'write', 'delete');
$effective_rights = array(
'entryLevelRights' => array(
diff --git a/lib/kolab_api_controller.php b/lib/kolab_api_controller.php
index ed716cf..f3f20bb 100644
--- a/lib/kolab_api_controller.php
+++ b/lib/kolab_api_controller.php
@@ -321,7 +321,7 @@ class kolab_api_controller
}
// user info requested (it's not possible to get manager info)
- if ($postdata['info'] && ($username != 'cn=Directory Manager')) {
+ if ($postdata['info'] && (strtolower($username) != 'cn=directory manager')) {
$service = $this->get_service('user');
$attributes = $service->object_attributes('user');
}