commit horde3 for openSUSE:Factory
Hello community, here is the log from the commit of package horde3 for openSUSE:Factory checked in at Tue Jan 25 10:05:04 CET 2011. -------- New Changes file: --- /dev/null 2010-08-26 16:28:41.000000000 +0200 +++ /mounts/work_src_done/STABLE/horde3/horde3.changes 2011-01-14 17:10:10.000000000 +0100 @@ -0,0 +1,79 @@ +------------------------------------------------------------------- +Thu Dec 16 11:03:04 UTC 2010 - lang@b1-systems.de + +- updated patch because it contained CVS info + +------------------------------------------------------------------- +Thu Dec 16 10:40:58 UTC 2010 - lang@b1-systems.de + +- updated to 3.3.11 +- Added the fatal on admin and finer grained admin privileges patch + +------------------------------------------------------------------- +Sat Oct 30 11:32:58 UTC 2010 - lang@b1-systems.de + +- made specfile more like those of the other horde packages +- added findlang to catch the .mo files +- removed kolab-related stuff which needs to go into a separate rpm +- added the finer grained administration patch + +------------------------------------------------------------------- +Mon Oct 25 13:47:55 UTC 2010 - lang@b1-systems.de + +- updated to 3.3.10 which runs on PHP 5.3 + +------------------------------------------------------------------- +Sat Oct 16 12:10:55 UTC 2010 - lang@b1-systems.de + +- adding restriction to php versions prior to 5.3 because there are some known issues which need to be fixed first + +- moving old changelog to changes file + +------------------------------------------------------------------- +Tue Oct 12 12:00:00 UTC 2010 - lang@b1-systems.de + +- expanded horde-3.3.9-php5_exec.patch to new files +- updated to version 3.3.9 +- de-fuzz patch to fix build on 11.3+ + +------------------------------------------------------------------- +Tue Nov 03 12:00:00 UTC 2009 - rbos@opensuse.org + +- Updated to version 3.3.5 +- Updated patch horde-3.1.3-php5_exec.patch to horde-3.3.5-php5_exec.patch + to match the current horde version + +------------------------------------------------------------------- +Sun Mar 01 12:00:00 UTC 2009 - rbos@opensuse.org + +- Removed the link from /srv/www/htdocs/horde/lib to /usr/share/php5 + And added post and postun scripts to add or to remove the directory + /srv/www/htdocs/horde/lib to include_path in the php.ini file to compensate + for the removed links + +------------------------------------------------------------------- +Sat Feb 21 12:00:00 UTC 2009 - rbos@opensuse.org + +- updated to version 3.3.3 + +------------------------------------------------------------------- +Tue Dec 23 12:00:00 UTC 2008 - rbos@opensuse.org + +- Required rpm php-pear-mail_mime changed to php5-pear-mail_mime + +------------------------------------------------------------------- +Sun Dec 21 12:00:00 UTC 2008 - rbos@opensuse.org + +- Made this package the owner of the directory /usr/share/php5/PEAR/Horde, to + prevent rpmlint errors in other package builds + +------------------------------------------------------------------- +Sun Dec 07 12:00:00 UTC 2008 - rbos@opensuse.org + +- Ensure that the directory %%{peardir}/Horde is owned by this package + +------------------------------------------------------------------- +Sat Dec 06 12:00:00 2008 - rbos@opensuse.org + +- Version 3.3 + calling whatdependson for head-i586 New: ---- horde-3.1.2-log.patch horde-3.2-rc1-usr_local.patch horde-3.3.11.tar.bz2 horde-3.3.9-php5_exec.patch horde-fatal-on-admin-3.3.11.patch horde-finer-grained-admin-privileges.patch horde3.changes horde3.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ horde3.spec ++++++ # # spec file for package horde3 # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild %define _phpdir php5 %define peardir %(pear config-get php_dir 2> /dev/null) %define _hordedir %(%{_sbindir}/apxs2 -q datadir)/htdocs/horde Name: horde3 Summary: Core Pieces for Running H3 Web Applications Version: 3.3.11 Release: 1 Url: http://www.horde.org/ License: GPLv2+ Group: Productivity/Networking/Web/Utilities Requires: mod_php_any Requires: php-gettext Requires: php-mcrypt Requires: php-imap Requires: php-pear Requires: php-pear-log Requires: php-session Requires: php-dom Requires: php5 Requires: php-pear-auth_sasl Requires: php-pear-date Requires: php-pear-file Requires: php-pear-mail Requires: php5-pear-mail_mime Requires: php5-pear-db Requires: php5-pear-mdb2 Requires: php5-pear-net_imap Requires: php5-pear-services_weather Requires: php5-pear-soap Requires: php5-pear-text_captcha Requires: php5-pear-text_figlet # this is atm provided by horde itself #Requires: php5-pear-text_diff Requires: php5-pear-http_request Requires: php5-pear-services_weather Requires: php5-pear-xml_svg Source0: horde-%{version}.tar.bz2 ############################ Patch0: horde-3.1.2-log.patch Patch1: horde-fatal-on-admin-3.3.11.patch Patch2: horde-finer-grained-admin-privileges.patch Patch3: horde-3.2-rc1-usr_local.patch Patch4: horde-3.3.9-php5_exec.patch BuildRequires: apache2-devel # This check is still needed for SLE-10-SP2 %if 0%{?suse_version} > 1020 BuildRequires: fdupes %endif BuildRequires: pcre-devel BuildRequires: php5-pear BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description These are the core pieces of the Horde suite of Web applications. This package is needed to run any of the other programs, such as IMP. Authors: -------- Chuck Hagenbuch <chuck@horde.org> Jan Schneider <jan@horde.org> Michael Slusarz <slusarz@horde.org> %prep %setup %setup -qn horde-%{version} %patch0 %patch1 %patch2 %patch3 %patch4 -p1 # Remove the .orig files that are created by the above patch' commands find -name "*.orig" -exec rm {} \; %build : if the following command fails, then apache dependencies are not met /usr/sbin/apxs2 -q datadir >/dev/null cd config for i in *.dist; do %__mv $i ${i%.dist} done %install %__mkdir_p %{buildroot}%{_hordedir} %__cp -r ./* %{buildroot}%{_hordedir} %__rm -rf %{buildroot}%{_hordedir}/{docs,README,LICENSE} %if 0%{?sles_version} != 10 %fdupes %buildroot%{_hordedir} %endif %find_lang horde %__install -d %{buildroot}/var/log/horde # The following files are removed, because they are now provided # by the packages: horde-auth, horde-group, horde-prefs, kolab-filter, # kolab-format, kolab-freebusy, kolab-server and kolab-storage. # # The following files are provided by horde, it seems that should # not be the case. # Horde/Kolab/Storage/Session.php # Horde/Prefs/kolab_imap.php # Horde/Share/kolab.php %__rm -rf %{buildroot}%{_hordedir}/lib/Horde/Kolab # prevent rpmlint warning / errors %if 0%{?suse_version} > 1020 %fdupes %{buildroot}%{_hordedir}/admin %fdupes %{buildroot}%{_hordedir}/js %fdupes %{buildroot}%{_hordedir}/lib %fdupes %{buildroot}%{_hordedir}/po %fdupes %{buildroot}%{_hordedir}/themes %fdupes %{buildroot}%{_hordedir}/scripts %fdupes %{buildroot}%{_hordedir}/templates %fdupes %{buildroot}%{_hordedir}/docs %fdupes %{buildroot}%{_hordedir}/services %fdupes %{buildroot}%{_hordedir}/rpc %fdupes %{buildroot}%{_hordedir}/util %endif %__install -d -m 755 %{buildroot}%{peardir}/Horde %find_lang horde %clean %__rm -rf %{buildroot} %files -f horde.lang %defattr(-, root, root) %doc README docs %doc %{_hordedir}/COPYING %dir %{_hordedir} %{_hordedir}/locale/.htaccess %{_hordedir}/locale/en_US/help.xml %{_hordedir}/admin %{_hordedir}/js %{_hordedir}/lib %{_hordedir}/po %dir %{_hordedir}/locale %dir %{_hordedir}/locale/en_US %{_hordedir}/scripts %{_hordedir}/services %{_hordedir}/templates %{_hordedir}/themes %{_hordedir}/util %{_hordedir}/rpc %{_hordedir}/*.php %attr(0750, wwwrun, www) %dir %{_hordedir}/config %attr(0640, root, www) %config(noreplace) %{_hordedir}/config/.htaccess %attr(0640, wwwrun, www) %config(noreplace) %{_hordedir}/config/*.php %attr(0640, wwwrun, www) %config(noreplace) %{_hordedir}/config/*.xml %attr(0750, wwwrun, www) %dir %{_hordedir}/config/registry.d %attr(0640, wwwrun, www) %{_hordedir}/config/registry.d/README %attr(0750, wwwrun, www) %dir /var/log/horde %post if [[ "$1" == 1 ]]; then # Horde is not yet installed on the system if ! grep -q "^include_path.*/srv/www/htdocs/horde/lib" /etc/php5/cli/php.ini; then # The directory /srv/www/htdocs/horde/lib, must be placed before # /usr/share/php5/PEAR otherwise applications will fail eval $(grep -w ^include_path /etc/php5/cli/php.ini | tr -d " ") for D in $(tr ":" " " <<< $include_path); do if [[ $D == "/usr/share/php5/PEAR" ]]; then INCLUDE_PATH="$INCLUDE_PATH:/srv/www/htdocs/horde/lib" fi INCLUDE_PATH="$INCLUDE_PATH:$D" done # Replace the include_path and remove the ":" at the beginning of the line cp /etc/php5/cli/php.ini /etc/php5/cli/php.ini-rpm-%{version}-%{release} sed -i "s,^include_path = .*,include_path = \"${INCLUDE_PATH##:}\"," /etc/php5/cli/php.ini fi fi %postun if [[ "$1" == 0 ]]; then # Horde is removed from the system if grep -qw /srv/www/htdocs/horde/lib /etc/php5/cli/php.ini; then cp /etc/php5/cli/php.ini /etc/php5/cli/php.ini-rpm-%{version}-%{release}-remove sed -i 's,/srv/www/htdocs/horde/lib:*,,' /etc/php5/cli/php.ini fi fi %changelog ++++++ horde-3.1.2-log.patch ++++++ Index: config/conf.xml =================================================================== --- config/conf.xml.orig +++ config/conf.xml @@ -797,7 +797,7 @@ <case name="file" desc="File"> <configstring name="name" desc="Path to the log - file">/tmp/horde.log</configstring> + file">/var/log/horde/horde.log</configstring> <configsection name="params"> <configboolean name="append" required="false" desc="Should new log entries be appended to an existing log file? If this is false, new log ++++++ horde-3.2-rc1-usr_local.patch ++++++ Index: config/mime_drivers.php.dist =================================================================== --- config/mime_drivers.php.dist.orig +++ config/mime_drivers.php.dist @@ -405,7 +405,7 @@ $mime_drivers['horde']['msword'] = array * xlhtml homepage: http://chicago.sourceforge.net/xlhtml/ */ $mime_drivers['horde']['msexcel'] = array( - 'location' => '/usr/local/bin/xlhtml', + 'location' => '/usr/bin/xlhtml', 'inline' => false, 'handles' => array( 'application/vnd.ms-excel', 'application/msexcel', @@ -423,7 +423,7 @@ $mime_drivers['horde']['msexcel'] = arra * xlhtml homepage: http://chicago.sourceforge.net/xlhtml/ */ $mime_drivers['horde']['mspowerpoint'] = array( - 'location' => '/usr/local/bin/ppthtml', + 'location' => '/usr/bin/ppthtml', 'inline' => false, 'handles' => array( 'application/vnd.ms-powerpoint', 'application/mspowerpoint' ++++++ horde-3.3.9-php5_exec.patch ++++++ Index: horde-3.3.11/admin/setup/scripts.php =================================================================== --- horde-3.3.11.orig/admin/setup/scripts.php +++ horde-3.3.11/admin/setup/scripts.php @@ -48,7 +48,7 @@ $data = ''; if ($setup == 'conf' && $type == 'php') { /* A bit ugly here, save PHP code into a string for creating the script * to be run at the command prompt. */ - $data = '#!/usr/bin/php' . "\n"; + $data = '#!/usr/bin/php5' . "\n"; $data .= '<?php' . "\n"; foreach ($_SESSION['_config'] as $app => $php) { $path = $registry->get('fileroot', $app) . '/config'; Index: horde-3.3.11/po/README =================================================================== --- horde-3.3.11.orig/po/README +++ horde-3.3.11/po/README @@ -24,7 +24,7 @@ discussions of i18n and l10n questions a ``horde/po`` your working directory in order to run the commands quoted below. But you can run the script from any directory, just adapt the directory to the script. See _Prerequisites if your PHP binary is not located in -``/usr/bin/php``. +``/usr/bin/php5``. For a list of available commands run:: @@ -48,7 +48,7 @@ PHP executable to be at ``/usr/bin/php`` place, either edit the first line of ``translation.php`` to reflect your location or call the script like:: - /usr/local/bin/php translation.php. + /usr/local/bin/php5 translation.php. You'll need the `gettext`_ package version 0.12 or greater. Index: horde-3.3.11/po/translation.php =================================================================== --- horde-3.3.11.orig/po/translation.php +++ horde-3.3.11/po/translation.php @@ -1,4 +1,4 @@ -#!/usr/bin/php -q +#!/usr/bin/php5 -q <?php /** * Translation helper application for the Horde framework. Index: horde-3.3.11/scripts/upgrades/migrate_user_categories.php =================================================================== --- horde-3.3.11.orig/scripts/upgrades/migrate_user_categories.php +++ horde-3.3.11/scripts/upgrades/migrate_user_categories.php @@ -1,4 +1,4 @@ -#!/usr/bin/php -q +#!/usr/bin/php5 -q <?php /** * $Horde: horde/scripts/upgrades/migrate_user_categories.php,v 1.1.2.3 2008-04-08 14:29:47 chuck Exp $ Index: horde-3.3.11/scripts/upgrades/move_history_out_of_datatree.php =================================================================== --- horde-3.3.11.orig/scripts/upgrades/move_history_out_of_datatree.php +++ horde-3.3.11/scripts/upgrades/move_history_out_of_datatree.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/php5 <?php /** * $Horde: horde/scripts/upgrades/move_history_out_of_datatree.php,v 1.3.2.3 2007-12-20 15:03:04 jan Exp $ Index: horde-3.3.11/scripts/upgrades/convert_datatree_perms_to_sql.php =================================================================== --- horde-3.3.11.orig/scripts/upgrades/convert_datatree_perms_to_sql.php +++ horde-3.3.11/scripts/upgrades/convert_datatree_perms_to_sql.php @@ -1,4 +1,4 @@ -#!/usr/bin/php -q +#!/usr/bin/php5 -q <?php /** * $Horde: horde/scripts/upgrades/convert_datatree_perms_to_sql.php,v 1.1.2.1 2008-05-02 16:46:01 jan Exp $ Index: horde-3.3.11/scripts/upgrades/convert_datatree_groups_to_sql.php =================================================================== --- horde-3.3.11.orig/scripts/upgrades/convert_datatree_groups_to_sql.php +++ horde-3.3.11/scripts/upgrades/convert_datatree_groups_to_sql.php @@ -1,4 +1,4 @@ -#!/usr/bin/php -q +#!/usr/bin/php5 -q <?php /** * $Horde: horde/scripts/upgrades/convert_datatree_groups_to_sql.php,v 1.1.2.2 2009-07-20 11:36:02 jan Exp $ Index: horde-3.3.11/scripts/import_squirrelmail_file_prefs.php =================================================================== --- horde-3.3.11.orig/scripts/import_squirrelmail_file_prefs.php +++ horde-3.3.11/scripts/import_squirrelmail_file_prefs.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/php5 <?php /** * This script imports SquirrelMail file-based preferences into Horde. Index: horde-3.3.11/scripts/import_squirrelmail_sql_prefs.php =================================================================== --- horde-3.3.11.orig/scripts/import_squirrelmail_sql_prefs.php +++ horde-3.3.11/scripts/import_squirrelmail_sql_prefs.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/php5 <?php /** * This script imports SquirrelMail database preferences into Horde. ++++++ horde-fatal-on-admin-3.3.11.patch ++++++ Index: admin/alarms.php =================================================================== --- admin/alarms.php.orig +++ admin/alarms.php @@ -17,7 +17,7 @@ require_once 'Horde/Form.php'; require_once 'Horde/Variables.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } $horde_alarm = Horde_Alarm::factory(); Index: admin/datatree.php =================================================================== --- admin/datatree.php.orig +++ admin/datatree.php @@ -34,7 +34,7 @@ require_once 'Horde/Tree.php'; require_once 'Horde/DataTree.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } $tree = &Horde_Tree::factory('datatree', 'html'); Index: admin/groups.php =================================================================== --- admin/groups.php.orig +++ admin/groups.php @@ -16,7 +16,7 @@ require_once 'Horde/Group.php'; require_once 'Horde/Tree.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } $groups = &Group::singleton(); Index: admin/perms/addchild.php =================================================================== --- admin/perms/addchild.php.orig +++ admin/perms/addchild.php @@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } /* Set up the form variables. */ Index: admin/perms/delete.php =================================================================== --- admin/perms/delete.php.orig +++ admin/perms/delete.php @@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } /* Set up the form variables. */ Index: admin/perms/edit.php =================================================================== --- admin/perms/edit.php.orig +++ admin/perms/edit.php @@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } /* Set up the form variables. */ Index: admin/perms/index.php =================================================================== --- admin/perms/index.php.orig +++ admin/perms/index.php @@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } $perm_id = Util::getFormData('perm_id'); Index: admin/phpshell.php =================================================================== --- admin/phpshell.php.orig +++ admin/phpshell.php @@ -14,7 +14,7 @@ require_once HORDE_BASE . '/lib/base.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } $title = _("PHP Shell"); Index: admin/sessions.php =================================================================== --- admin/sessions.php.orig +++ admin/sessions.php @@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php require_once 'Horde/SessionHandler.php'; if (!Auth::isAdmin()) { - Horde::authenticationFailureRedirect(); + Horde::fatal('Forbidden.', __FILE__, __LINE__); } $type = !empty($conf['sessionhandler']['type']) ? $conf['sessionhandler']['type'] : 'none'; ++++++ horde-finer-grained-admin-privileges.patch ++++++ Index: admin/alarms.php =================================================================== --- admin/alarms.php.orig +++ admin/alarms.php @@ -16,7 +16,7 @@ require_once 'Horde/Alarm.php'; require_once 'Horde/Form.php'; require_once 'Horde/Variables.php'; -if (!Auth::isAdmin()) { +if (!Auth::isAdmin() && !$GLOBALS['perms']->hasPermission('horde:administration:admin_alarms', Auth::getAuth(), true)) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/cmdshell.php =================================================================== --- admin/cmdshell.php.orig +++ admin/cmdshell.php @@ -13,7 +13,7 @@ @define('HORDE_BASE', dirname(__FILE__) . '/..'); require_once HORDE_BASE . '/lib/base.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_cmdshell', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/datatree.php =================================================================== --- admin/datatree.php.orig +++ admin/datatree.php @@ -33,7 +33,7 @@ require_once HORDE_BASE . '/lib/base.php require_once 'Horde/Tree.php'; require_once 'Horde/DataTree.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_datatree', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/groups.php =================================================================== --- admin/groups.php.orig +++ admin/groups.php @@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php require_once 'Horde/Group.php'; require_once 'Horde/Tree.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_groups', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/perms/addchild.php =================================================================== --- admin/perms/addchild.php.orig +++ admin/perms/addchild.php @@ -14,7 +14,7 @@ @define('HORDE_BASE', dirname(__FILE__) . '/../..'); require_once HORDE_BASE . '/lib/base.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_perms', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/perms/delete.php =================================================================== --- admin/perms/delete.php.orig +++ admin/perms/delete.php @@ -14,7 +14,7 @@ @define('HORDE_BASE', dirname(__FILE__) . '/../..'); require_once HORDE_BASE . '/lib/base.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_perms', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/perms/edit.php =================================================================== --- admin/perms/edit.php.orig +++ admin/perms/edit.php @@ -14,7 +14,7 @@ @define('HORDE_BASE', dirname(__FILE__) . '/../..'); require_once HORDE_BASE . '/lib/base.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && !$GLOBALS['perms']->hasPermission('horde:administration:admin_perms', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/perms/index.php =================================================================== --- admin/perms/index.php.orig +++ admin/perms/index.php @@ -14,7 +14,7 @@ @define('HORDE_BASE', dirname(__FILE__) . '/../..'); require_once HORDE_BASE . '/lib/base.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_perms', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/phpshell.php =================================================================== --- admin/phpshell.php.orig +++ admin/phpshell.php @@ -13,7 +13,7 @@ @define('HORDE_BASE', dirname(__FILE__) . '/..'); require_once HORDE_BASE . '/lib/base.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_phpshell', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/sessions.php =================================================================== --- admin/sessions.php.orig +++ admin/sessions.php @@ -14,7 +14,7 @@ require_once HORDE_BASE . '/lib/base.php'; require_once 'Horde/SessionHandler.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin() && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_sessions', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/setup/config.php =================================================================== --- admin/setup/config.php.orig +++ admin/setup/config.php @@ -18,7 +18,7 @@ require_once 'Horde/Form/Renderer.php'; require_once 'Horde/Config.php'; require_once 'Horde/Variables.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_configuration', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/setup/diff.php =================================================================== --- admin/setup/diff.php.orig +++ admin/setup/diff.php @@ -19,7 +19,7 @@ require_once 'Horde/Template.php'; include_once 'Text/Diff.php'; include_once 'Text/Diff/Renderer.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_configuration', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/setup/index.php =================================================================== --- admin/setup/index.php.orig +++ admin/setup/index.php @@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php require_once 'Horde/Template.php'; require_once 'Horde/Form/Renderer.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_configuration', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/sqlshell.php =================================================================== --- admin/sqlshell.php.orig +++ admin/sqlshell.php @@ -14,7 +14,7 @@ require_once HORDE_BASE . '/lib/base.php'; require_once 'DB.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_sqlshell', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } Index: admin/user.php =================================================================== --- admin/user.php.orig +++ admin/user.php @@ -17,9 +17,10 @@ require_once 'Horde/Variables.php'; require_once 'Horde/Form/Renderer.php'; require_once 'Horde/Variables.php'; -if (!Auth::isAdmin()) { +if ((!Auth::isAdmin()) && (!$GLOBALS['perms']->hasPermission('horde:administration:admin_users', Auth::getAuth(), true))) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } + $auth = &Auth::singleton($conf['auth']['driver']); if ($conf['signup']['allow'] && $conf['signup']['approve']) { Index: services/portal/sidebar.php =================================================================== --- services/portal/sidebar.php.orig +++ services/portal/sidebar.php @@ -113,15 +113,13 @@ function buildMenu() $menu[$app] = $params; } - // Add the administration menu if the user is an admin. - if (Auth::isAdmin()) { - $menu['administration'] = array('name' => _("Administration"), - 'icon' => $registry->getImageDir() . '/administration.png', - 'status' => 'heading'); - - $list = $registry->callByPackage('horde', 'admin_list'); - if (!is_a($list, 'PEAR_Error')) { - foreach ($list as $method => $vals) { + // determine which administration modules belong into the list of administration links + $list = $registry->callByPackage('horde', 'admin_list'); + $count_links = 0; + if (!is_a($list, 'PEAR_Error')) { + foreach ($list as $method => $vals) { + if ((Auth::isAdmin()) || ($GLOBALS['perms']->hasPermission('horde:administration:admin_' . $method, Auth::getAuth(), true))) { + $count_links++; $name = Horde::stripAccessKey($vals['name']); $icon = isset($vals['icon']) ? $registry->getImageDir() . '/' . $vals['icon'] : $registry->get('icon'); @@ -135,6 +133,13 @@ function buildMenu() } } } + // only show administration heading when there are links to display (implies isAdmin or user has some admin privilege + if ($count_links) { + $menu['administration'] = array('name' => _("Administration"), + 'icon' => $registry->getImageDir() . '/administration.png', + 'status' => 'heading'); + } + if (Horde::showService('options') && $conf['prefs']['driver'] != '' && $conf['prefs']['driver'] != 'none') { Index: templates/admin/menu.inc =================================================================== --- templates/admin/menu.inc.orig +++ templates/admin/menu.inc @@ -4,9 +4,11 @@ $menu = new Menu(HORDE_MENU_MASK_NONE); $list = $registry->callByPackage('horde', 'admin_list'); if (!is_a($list, 'PEAR_Error')) { - foreach ($list as $vals) { - $img = isset($vals['icon']) ? $registry->getImageDir() . '/' . $vals['icon'] : $registry->get('icon'); - $menu->add(Horde::url($registry->applicationWebPath($vals['link'])), $vals['name'], $img, ''); + foreach ($list as $key => $vals) { + if ((Auth::isAdmin()) || ($GLOBALS['perms']->hasPermission('horde:administration:admin_' . $key, Auth::getAuth(), true))) { + $img = isset($vals['icon']) ? $registry->getImageDir() . '/' . $vals['icon'] : $registry->get('icon'); + $menu->add(Horde::url($registry->applicationWebPath($vals['link'])), $vals['name'], $img, ''); + } } } echo $menu->render(); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de