Projects
Kolab:3.4
kolab-webadmin
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 50
View file
kolab-webadmin.spec
Changed
@@ -34,7 +34,7 @@ %global kolabr_group_id 414 Name: kolab-webadmin -Version: 3.2.3 +Version: 3.2.4 Release: 1%{?dist} Summary: Kolab Groupware Server Web Administration Interface License: AGPLv3+ @@ -167,6 +167,9 @@ %attr(0770,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog +* Wed Nov 19 2014 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.2.4-1 +- New upstream release + * Tue Nov 11 2014 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.2.3-1 - New upstream release
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +kolab-webadmin (3.2.4-0~kolab1) unstable; urgency=low + + * New upstream release 3.2.4 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 19 Nov 2014 22:08:00 +0100 + kolab-webadmin (3.2.3-0~kolab1) unstable; urgency=low * New upstream release 3.2.3
View file
kolab-webadmin-3.2.3.tar.gz/lib/Auth/LDAP.php -> kolab-webadmin-3.2.4.tar.gz/lib/Auth/LDAP.php
Changed
@@ -562,7 +562,7 @@ // TODO: The rdn is configurable as well. // Use [$type_str . "_"]user_rdn_attr - $dn = "cn=" . $attrs['cn'] . "," . $base_dn; + $dn = "cn=" . Net_LDAP3::quote_string($attrs['cn'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -734,7 +734,7 @@ // TODO: The rdn is configurable as well. // Use [$type_str . "_"]ou_rdn_attr - $dn = "ou=" . $attrs['ou'] . "," . $base_dn; + $dn = "ou=" . Net_LDAP3::quote_string($attrs['ou'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -792,7 +792,7 @@ // TODO: The rdn is configurable as well. // Use [$type_str . "_"]resource_rdn_attr - $dn = "cn=" . $attrs['cn'] . "," . $base_dn; + $dn = "cn=" . Net_LDAP3::quote_string($attrs['cn'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -843,7 +843,7 @@ // TODO: The rdn is configurable as well. // Use [$type_str . "_"]role_rdn_attr - $dn = "cn=" . $attrs['cn'] . "," . $base_dn; + $dn = "cn=" . Net_LDAP3::quote_string($attrs['cn'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -895,7 +895,7 @@ // TODO: The rdn is configurable as well. // Use [$type_str . "_"]user_rdn_attr - $dn = "cn=" . $attrs['cn'] . "," . $base_dn; + $dn = "cn=" . Net_LDAP3::quote_string($attrs['cn'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -967,7 +967,7 @@ // TODO: The rdn is configurable as well. // Use [$type_str . "_"]user_rdn_attr - $dn = "uid=" . $attrs['uid'] . "," . $base_dn; + $dn = "uid=" . Net_LDAP3::quote_string($attrs['uid'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); }
View file
kolab-webadmin-3.2.3.tar.gz/lib/api/kolab_api_service_form_value.php -> kolab-webadmin-3.2.4.tar.gz/lib/api/kolab_api_service_form_value.php
Changed
@@ -131,11 +131,12 @@ $method_name = 'list_options_' . strtolower($attr_name) . '_' . strtolower($postdata['object_type']); if (!method_exists($this, $method_name)) { - //console("Method $method_name doesn't exist"); + Log::debug("Method $method_name doesn't exist"); $method_name = 'list_options_' . strtolower($attr_name); if (!method_exists($this, $method_name)) { + Log::debug("Method $method_name doesn't exist"); return $result; } } @@ -894,11 +895,6 @@ return $this->_list_options_users($postdata, $attribs); } - private function list_options_owner($postdata, $attribs = array()) - { - return $this->_list_options_users($postdata, $attribs); - } - private function list_options_member($postdata, $attribs = array()) { return $this->_list_options_members($postdata, $attribs); @@ -947,6 +943,47 @@ return $list; } + private function list_options_ou($postdata, $attribs = array()) + { + // return specified records only, by exact DN attributes + if (!empty($postdata['list'])) { + $data['page_size'] = count($postdata['list']); + $data['search'] = array( + 'entrydn' => array( + 'value' => $postdata['list'], + 'type' => 'exact', + ), + ); + } + // return records with specified string + else { + $keyword = array('value' => $postdata['search']); + $data['page_size'] = 15; + $data['search'] = array( + 'entrydn' => $keyword, + 'description' => $keyword, + ); + } + + $data['attributes'] = array('ou', 'entrydn'); + + $service = $this->controller->get_service('ous'); + $result = $service->ous_list(null, $data); + $list = $result['list']; + + // convert to key=>value array + foreach ($list as $idx => $value) { + $list[$idx] = $value['entrydn']; + } + + return $list; + } + + private function list_options_owner($postdata, $attribs = array()) + { + return $this->_list_options_users($postdata, $attribs); + } + private function list_options_uniquemember($postdata, $attribs = array()) { $result = $this->_list_options_members($postdata, $attribs);
View file
kolab-webadmin-3.2.3.tar.gz/lib/client/kolab_client_task_settings.php -> kolab-webadmin-3.2.4.tar.gz/lib/client/kolab_client_task_settings.php
Changed
@@ -36,6 +36,8 @@ 'text-quota', 'aci', 'imap_acl', ); + protected $special_attributes = array('ou'); + /** * Default action. @@ -871,6 +873,11 @@ if (!empty($response['list'])) { // remove objectClass $attributes = array_diff($response['list'], array('objectClass')); + + // add special attributes - always supported + $attributes = array_unique(array_merge($attributes, $this->special_attributes)); + sort($attributes); + if (count($attributes)) { $attributes = array_combine(array_map('strtolower', $attributes), $attributes); } @@ -883,6 +890,7 @@ $this->output->set_env('attributes', $attributes); $this->output->set_env('attributes_required', $required); + $this->output->set_env('special_attributes', $this->special_attributes); return $attributes; }
View file
kolab-webadmin-3.2.3.tar.gz/lib/ext/Net/LDAP3.php -> kolab-webadmin-3.2.4.tar.gz/lib/ext/Net/LDAP3.php
Changed
@@ -1241,7 +1241,7 @@ $this->_debug("old attrs. is array, new attrs. is not array. new attr. exists in old attrs."); - $rdn_attr_value = array_shift($old_attrs[$attr]); + $rdn_attr_value = array_shift($old_attrs[$attr]); $_attr_to_remove = array(); foreach ($old_attrs[$attr] as $value) { @@ -1256,14 +1256,14 @@ if (strtolower($new_attrs[$attr]) !== strtolower($rdn_attr_value)) { $this->_debug("new attrs is not the same as the old rdn value, issuing a rename"); - $mod_array['rename']['dn'] = $subject_dn; - $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . $new_attrs[$attr][0]; + $mod_array['rename']['dn'] = $subject_dn; + $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . self::quote_string($new_attrs[$attr], true); } } else { $this->_debug("new attrs is not the same as any of the old rdn value, issuing a full rename"); - $mod_array['rename']['dn'] = $subject_dn; - $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . $new_attrs[$attr]; + $mod_array['rename']['dn'] = $subject_dn; + $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . self::quote_string($new_attrs[$attr], true); } } else { @@ -1274,17 +1274,17 @@ } else { // TODO: This fails. - $mod_array['rename']['dn'] = $subject_dn; - $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . $new_attrs[$attr][0]; - $mod_array['del'][$attr] = $old_attrs[$attr][0]; + $mod_array['rename']['dn'] = $subject_dn; + $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . self::quote_string($new_attrs[$attr][0], true); + $mod_array['del'][$attr] = $old_attrs[$attr][0]; } } } else { if (!is_array($new_attrs[$attr])) { $this->_debug("Renaming " . $old_attrs[$attr] . " to " . $new_attrs[$attr]); - $mod_array['rename']['dn'] = $subject_dn; - $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . $new_attrs[$attr]; + $mod_array['rename']['dn'] = $subject_dn; + $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . self::quote_string($new_attrs[$attr], true); } else { $this->_debug("Adding to replace"); @@ -1293,7 +1293,6 @@ continue; } } - } else { if (!isset($new_attrs[$attr]) || $new_attrs[$attr] === '' || (is_array($new_attrs[$attr]) && empty($new_attrs[$attr]))) { @@ -1389,9 +1388,12 @@ $old_ou = implode(',', $subject_dn_components); } + $subject_dn = self::unified_dn($subject_dn); + $prefix = self::unified_dn('ou=' . $old_ou) . ','; + // object is an organizational unit - if (strpos($subject_dn, 'ou=' . $old_ou) === 0) { - $root = substr($subject_dn, strlen($old_ou) + 4); // remove ou=*, + if (strpos($subject_dn, $prefix) === 0) { + $root = substr($subject_dn, strlen($prefix)); // remove ou=*, if ((!empty($new_attrs['base_dn']) && strtolower($new_attrs['base_dn']) !== strtolower($root)) || (strtolower($old_ou) !== strtolower($new_ou)) @@ -1402,15 +1404,22 @@ $mod_array['rename']['new_parent'] = $root; $mod_array['rename']['dn'] = $subject_dn; - $mod_array['rename']['new_rdn'] = 'ou=' . $new_ou; + $mod_array['rename']['new_rdn'] = 'ou=' . self::quote_string($new_ou, true); } } // not OU object, but changed ou attribute - else if ((!empty($old_ou) && !empty($new_ou)) && strtolower($old_ou) !== strtolower($new_ou)) { - $mod_array['rename']['new_parent'] = $new_ou; - if (empty($mod_array['rename']['dn']) || empty($mod_array['rename']['new_rdn'])) { - $mod_array['rename']['dn'] = $subject_dn; - $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . $new_attrs[$rdn_attr]; + else if (!empty($old_ou) && !empty($new_ou)) { + // unify DN strings for comparison + $old_ou = self::unified_dn($old_ou); + $new_ou = self::unified_dn($new_ou); + + if (strtolower($old_ou) !== strtolower($new_ou)) { + $mod_array['rename']['new_parent'] = $new_ou; + if (empty($mod_array['rename']['dn']) || empty($mod_array['rename']['new_rdn'])) { + $rdn_attr_value = self::quote_string($new_attrs[$rdn_attr], true); + $mod_array['rename']['dn'] = $subject_dn; + $mod_array['rename']['new_rdn'] = $rdn_attr . '=' . $rdn_attr_value; + } } } @@ -2145,23 +2154,23 @@ private function modify_entry_attributes($subject_dn, $attributes) { - // Opportunities to set false include failed ldap commands. - $result = true; - if (is_array($attributes['rename']) && !empty($attributes['rename'])) { - $olddn = $attributes['rename']['dn']; - $newrdn = $attributes['rename']['new_rdn']; - - if (!empty($attributes['rename']['new_parent'])) { - $new_parent = $attributes['rename']['new_parent']; - } - else { - $new_parent = null; - } + $olddn = $attributes['rename']['dn']; + $newrdn = $attributes['rename']['new_rdn']; + $new_parent = $attributes['rename']['new_parent']; $this->_debug("LDAP: C: Rename $olddn to $newrdn,$new_parent"); - $result = ldap_rename($this->conn, $olddn, $newrdn, $new_parent, true); + // Note: for some reason the operation fails if RDN contains special characters + // and last argument of ldap_rename() is set to TRUE. That's why we use FALSE. + // However, we need to modify RDN attribute value later, otherwise it + // will contain an array of previous and current values + for ($i = 1; $i >= 0; $i--) { + $result = ldap_rename($this->conn, $olddn, $newrdn, $new_parent, $i == 1); + if ($result) { + break; + } + } if ($result) { $this->_debug("LDAP: S: OK"); @@ -2176,6 +2185,12 @@ $old_parent_dn = implode(",", $old_parent_dn_components); $subject_dn = $newrdn . ',' . $old_parent_dn; } + + // modify RDN attribute value, see note above + if (!$i && empty($attributes['replace'][$attr])) { + list($attr, $val) = explode('=', $newrdn, 2); + $attributes['replace'][$attr] = self::quote_string($val, true, true); + } } else { $this->_debug("LDAP: S: " . ldap_error($this->conn)); @@ -2391,14 +2406,15 @@ /** * Quotes attribute value string * - * @param string $str Attribute value - * @param bool $dn True if the attribute is a DN + * @param string $str Attribute value + * @param bool $dn True if the attribute is a DN + * @param bool $reverse Do reverse replacement * * @return string Quoted string */ - public static function quote_string($str, $is_dn = false) + public static function quote_string($str, $is_dn = false, $reverse = false) { - // take firt entry if array given + // take first entry if array given if (is_array($str)) { $str = reset($str); } @@ -2426,10 +2442,42 @@ ); } + if ($reverse) { + return str_replace(array_values($replace), array_keys($replace), $str); + } + return strtr($str, $replace); } /** + * Unify DN string for comparison + * + * @para string $str DN string + * + * @return string Unified DN string + */ + public static function unified_dn($str) + { + $result = array(); + + foreach (explode(',', $str) as $token) { + list($attr, $value) = explode('=', $token, 2); + + $pos = 0; + while (preg_match('/\\\\[0-9a-fA-F]{2}/', $value, $matches, PREG_OFFSET_CAPTURE, $pos)) {
View file
kolab-webadmin-3.2.3.tar.gz/public_html/js/kolab_admin.js -> kolab-webadmin-3.2.4.tar.gz/public_html/js/kolab_admin.js
Changed
@@ -2991,6 +2991,13 @@ required = $.map(required, function(a) { return a == 'objectClass' ? null : a; }); list = $.map(list, function(a) { return a == 'objectClass' ? null : a; }); + // append special attributes + $.each(this.env.special_attributes || [], function() { + if ($.inArray(this, list) == -1) + list.push(this); + }); + list.sort(); + this.env.attributes = {}; this.env.attributes_required = required; select.empty();
View file
kolab-webadmin-3.2.3.tar.gz/public_html/skins/default/style.css -> kolab-webadmin-3.2.4.tar.gz/public_html/skins/default/style.css
Changed
@@ -653,7 +653,8 @@ background-color: transparent; padding-left: 2px; width: 328px; - height: 16px; + height: 17px; + line-height: 17px; } span.listarea.disabled span.listelement input, @@ -667,7 +668,7 @@ span.listelement span.actions { float: left; - padding: 1px 0; + padding: 0; margin-left: -1px; margin-top: -1px; height: 18px; @@ -690,16 +691,16 @@ } span.listelement span.actions span.reset { - background-position: -1px -1px; + background-position: -1px 0; border-left: 1px solid #e0e0e0; } span.listelement span.actions span.add { - background-position: -2px -41px; + background-position: -1px -41px; } span.listelement span.actions span.search { - background-position: -1px -61px; + background-position: -1px -60px; cursor: default; }
View file
kolab-webadmin.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-webadmin Binary: kolab-webadmin Architecture: all -Version: 3.2.3-0~kolab1 +Version: 3.2.4-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/ @@ -13,5 +13,5 @@ Package-List: kolab-webadmin deb admin extra Files: - 00000000000000000000000000000000 0 kolab-webadmin-3.2.3.tar.gz + 00000000000000000000000000000000 0 kolab-webadmin-3.2.4.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.