Projects
Kolab:16:TestingLinked
kolab-webadmin
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 10
View file
kolab-webadmin.spec
Changed
@@ -34,7 +34,7 @@ %global kolabr_group_id 414 Name: kolab-webadmin -Version: 3.2.13 +Version: 3.2.14 Release: 1%{?dist} Summary: Kolab Groupware Server Web Administration Interface License: AGPLv3+ @@ -163,6 +163,9 @@ %attr(0770,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog +* Tue Jul 2 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 3.2.14-1 +- Release 3.2.14 + * Wed Jun 5 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 3.2.13-1 - Release 3.2.13
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +kolab-webadmin (3.2.14-0~kolab1) unstable; urgency=low + + * Release 3.2.14 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Tue, 2 Jul 2019 22:08:00 +0100 + kolab-webadmin (3.2.13-0~kolab2) unstable; urgency=low * Release 3.2.13
View file
kolab-webadmin-3.2.13.tar.gz/lib/SQL.php -> kolab-webadmin-3.2.14.tar.gz/lib/SQL.php
Changed
@@ -78,6 +78,11 @@ $conf = Conf::get_instance(); $dsn = $conf->get($conn_name, 'sql_uri'); + if (empty($dsn)) { + Log::error("Configuration error. Empty DSN ($conn_name/sql_uri)"); + exit; + } + $driver = strtolower(substr($dsn, 0, strpos($dsn, ':'))); $driver_map = array( 'sqlite2' => 'sqlite',
View file
kolab-webadmin-3.2.13.tar.gz/lib/api/kolab_api_service_form_value.php -> kolab-webadmin-3.2.14.tar.gz/lib/api/kolab_api_service_form_value.php
Changed
@@ -1604,28 +1604,34 @@ */ private function _get_valid_domains($my_primary_domain = null) { - $my_primary_domain = $my_primary_domain !== null - ? $my_primary_domain - : $_SESSION'user'->get_domain(); - - $auth = Auth::get_instance(); - $conf = Conf::get_instance(); - $all_domains = $auth->list_domains(); - $all_domains = $all_domains'list'; - $all_basedns = Array(); - $dna = $conf->get('domain_name_attribute'); - $dra = $conf->get('domain_rootdn_attribute'); + static $domains, $context; + + $my_primary_domain = $my_primary_domain ?: $_SESSION'user'->get_domain(); + + if (is_array($domains) && $context === $my_primary_domain) { + Log::trace("_get_valid_domains(" . $my_primary_domain . "), use memory cache"); + return $domains; + } Log::trace("_get_valid_domains(" . $my_primary_domain . ")"); - $valid_domains = $my_primary_domain ? array($my_primary_domain) : array(); + $auth = Auth::get_instance(); + $conf = Conf::get_instance(); + $all_domains = $auth->list_domains(array(), array(), array('page_size' => 99999)); + $all_domains = $all_domains'list'; + $all_basedns = array(); + $dna = $conf->get('domain_name_attribute'); + $dra = $conf->get('domain_rootdn_attribute'); + $domains = $my_primary_domain ? array($my_primary_domain) : array(); + $context = $my_primary_domain; + foreach ($all_domains as $domain_id => $domain_attrs) { if (!is_array($domain_attrs$dna)) { - $domain_attrs$dna = (array)($domain_attrs$dna); + $domain_attrs$dna = (array) $domain_attrs$dna; } if (in_array($my_primary_domain, $domain_attrs$dna)) { - $valid_domains = array_merge($valid_domains, $domain_attrs$dna); + $domains = array_merge($domains, $domain_attrs$dna); } if (array_key_exists($dra, $domain_attrs)) { @@ -1637,17 +1643,17 @@ } } - foreach ($all_basedns as $base_dn => $domains) { - if (in_array($my_primary_domain, $domains)) { - $valid_domains = array_merge($valid_domains, $domains); + foreach ($all_basedns as $base_dn => $_domains) { + if (in_array($my_primary_domain, $_domains)) { + $domains = array_merge($domains, $_domains); } } - $result = array_unique($valid_domains); + $domains = array_unique($domains); - Log::trace("_get_valid_domains result: " . var_export($result, TRUE)); + Log::trace("_get_valid_domains result: " . var_export($domains, true)); - return array_unique($result); + return $domains; } private function _validate_email_address_in_any_of_my_domains($mail_address)
View file
kolab-webadmin-3.2.13.tar.gz/lib/api/kolab_api_service_user.php -> kolab-webadmin-3.2.14.tar.gz/lib/api/kolab_api_service_user.php
Changed
@@ -37,14 +37,10 @@ */ public function capabilities($domain) { - //console("kolab_api_service_group::capabilities"); - $auth = Auth::get_instance($domain); $effective_rights = $auth->list_rights('user'); - //console("effective_rights", $effective_rights); - $rights = array(); if (in_array('add', $effective_rights'entryLevelRights')) { @@ -56,7 +52,8 @@ } if (in_array('modrdn', $effective_rights'entryLevelRights')) { - $rights'edit' = "w"; + $rights'edit' = "w"; + $rights'password' = "w"; } if (in_array('read', $effective_rights'entryLevelRights')) { @@ -111,7 +108,6 @@ */ public function user_delete($getdata, $postdata) { - //console("user_delete()", $getdata, $postdata); if (!isset($postdata'id')) { return false; } @@ -120,13 +116,17 @@ $auth = Auth::get_instance(); $result = $auth->user_delete($postdata'id'); - if ($result) { - return $result; - } - - return false; + return $result; } + /** + * Update user. + * + * @param array $get GET parameters + * @param array $post POST parameters + * + * @return array|bool User attributes or False on error. + */ public function user_edit($getdata, $postdata) { Log::trace("\$postdata to user_edit()", $postdata); @@ -148,9 +148,45 @@ } return false; + } + /** + * Update user password. + * + * @param array $get GET parameters + * @param array $post POST parameters + * + * @return bool True on success, False on failure + */ + public function user_password($getdata, $postdata) + { + $password = $postdata'password'; + $user_id = $postdata'id'; + + if (empty($user_id) || !is_string($password) || !strlen($password)) { + return false; + } + + if ($user_id === 'me') { + $user_id = $_SESSION'user'->get_userid(); + } + + password_policy::validate_password($password); + + $auth = Auth::get_instance(); + $result = $auth->user_edit($user_id, array('userpassword' => $password)); + + return $result !== false; } + /** + * Effective rights on user record. + * + * @param array $get GET parameters + * @param array $post POST parameters + * + * @return array Effective rights + */ public function user_effective_rights($getdata, $postdata) { $auth = Auth::get_instance(); @@ -230,5 +266,4 @@ return false; } - }
View file
kolab-webadmin.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-webadmin Binary: kolab-webadmin Architecture: all -Version: 3.2.13-0~kolab2 +Version: 3.2.14-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.13.tar.gz + 00000000000000000000000000000000 0 kolab-webadmin-3.2.14.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
.