gunnar: server/php-kolab/Kolab_Freebusy issue3537.patch, NONE, 1.1.2.1 Kolab_FreeBusy.spec, 1.18.2.2, 1.18.2.3 Makefile, 1.6.2.1, 1.6.2.2

cvs at kolab.org cvs at kolab.org
Mon Apr 6 15:59:27 CEST 2009


Author: gunnar

Update of /kolabrepository/server/php-kolab/Kolab_Freebusy
In directory doto:/tmp/cvs-serv23209/php-kolab/Kolab_Freebusy

Modified Files:
      Tag: kolab_2_2_branch
	Kolab_FreeBusy.spec Makefile 
Added Files:
      Tag: kolab_2_2_branch
	issue3537.patch 
Log Message:
 kolab/issue3537 (Allowing xfb access to groups does not work)

--- NEW FILE: issue3537.patch ---
--- a/lib/Horde/Kolab/FreeBusy/Cache.php.orig	2009-04-06 15:23:35.000000000 +0200
+++ b/lib/Horde/Kolab/FreeBusy/Cache.php	2009-04-06 15:51:49.000000000 +0200
@@ -363,9 +363,27 @@
         /* Check if the calling user has access to the extended information of
          * the folder we are about to integrate into the free/busy data.
          */
-        $groups = $access->user_object->getGroups();
-        if (is_a($groups, 'PEAR_Error')) {
-            return $groups;
+        $uid_groups = $access->user_object->getGroups();
+        if (is_a($uid_groups, 'PEAR_Error')) {
+            return $uid_groups;
+        }
+
+        global $conf;
+        require_once 'Horde/Kolab/Server.php';
+        /* Connect to the Kolab user database */
+        $db = &Horde_Kolab_Server::singleton(array('uid' => $conf['kolab']['ldap']['phpdn']));
+
+        $groups = array();
+        foreach ($uid_groups as $uid) {
+            $group = $db->fetch($uid);
+            if (is_a($groups, 'PEAR_Error')) {
+                continue;
+            }
+            $mail = $group->get(KOLAB_ATTR_MAIL);
+            if (is_a($mail, 'PEAR_Error')) {
+                continue;
+            }
+            $groups[] = $mail;
         }
 
         $groups[] = $access->user;

Index: Kolab_FreeBusy.spec
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Freebusy/Kolab_FreeBusy.spec,v
retrieving revision 1.18.2.2
retrieving revision 1.18.2.3
diff -u -d -r1.18.2.2 -r1.18.2.3
--- Kolab_FreeBusy.spec	20 Mar 2009 22:11:48 -0000	1.18.2.2
+++ Kolab_FreeBusy.spec	6 Apr 2009 13:59:22 -0000	1.18.2.3
@@ -1,7 +1,7 @@
 # Variables
 %define         V_package Kolab_FreeBusy
 %define         V_version 0.1.2
-%define         V_release 20090320
+%define         V_release 20090406
 
 # Package Information
 Name:	   %{V_package}
@@ -22,6 +22,7 @@
 Patch0:    kolab_issue3313.patch
 Patch1:    issue3438.patch
 Patch2:    issue3450.patch
+Patch3:    issue3537.patch
 
 # Build Info
 Prefix:	   %{l_prefix}
@@ -57,6 +58,7 @@
         %patch -p1 -P 0
         %patch -p3 -P 1
         %patch -p3 -P 2
+        %patch -p1 -P 3
         cp %{S:1} .
 
 %build

Index: Makefile
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Freebusy/Makefile,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -u -d -r1.6.2.1 -r1.6.2.2
--- Makefile	20 Mar 2009 22:11:48 -0000	1.6.2.1
+++ Makefile	6 Apr 2009 13:59:22 -0000	1.6.2.2
@@ -21,7 +21,7 @@
 
 SOURCE_URL=http://pear.horde.org/get
 SOURCE_0=$(PACKAGE)-$(VERSION).tgz
-EXTRA=ChangeLog kolab_issue3313.patch issue3438.patch issue3450.patch package.xml
+EXTRA=ChangeLog kolab_issue3313.patch issue3438.patch issue3450.patch issue3537.patch package.xml
 
 .PHONY: all
 all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm





More information about the commits mailing list