From b893f69c5fc4c74c77ee9cba809192e82700975b Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 2 Mar 2010 19:17:42 +0100 Subject: [PATCH] Don't retrieve user list if we don't display it anyway. --- horde/services/shares/edit.php | 4 +++- kronolith/perms.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/horde/services/shares/edit.php b/horde/services/shares/edit.php index a05bc7b36..0fa50b968 100644 --- a/horde/services/shares/edit.php +++ b/horde/services/shares/edit.php @@ -261,7 +261,9 @@ if (is_a($share, 'PEAR_Error')) { $title = sprintf(_("Edit permissions for \"%s\""), $share->get('name')); } -if ($auth->hasCapability('list')) { +if ($auth->hasCapability('list') && + ($conf['auth']['list_users'] == 'list' || + $conf['auth']['list_users'] == 'both')) { $userList = $auth->listUsers(); if ($userList instanceof PEAR_Error) { Horde::logMessage($userList, __FILE__, __LINE__, PEAR_LOG_ERR); diff --git a/kronolith/perms.php b/kronolith/perms.php index aa95bd347..0914b3f29 100644 --- a/kronolith/perms.php +++ b/kronolith/perms.php @@ -270,7 +270,9 @@ if ($share instanceof PEAR_Error) { $title = sprintf(_("Edit Permissions for %s"), $share->get('name')); } -if ($auth->hasCapability('list')) { +if ($auth->hasCapability('list') && + ($conf['auth']['list_users'] == 'list' || + $conf['auth']['list_users'] == 'both')) { try { $userList = $auth->listUsers(); } catch (Exception $e) { -- 2.11.0