6.0.0-beta1
8/10/25

[#6287] View share of other users
Summary View share of other users
Queue Kolab
Type Enhancement
State Resolved
Priority 2. Medium
Owners wrobel (at) horde (dot) org
Requester mrousseau (at) ate (dot) tm (dot) fr
Created 02/19/2008 (6382 days ago)
Due
Updated 03/03/2008 (6369 days ago)
Assigned 02/25/2008 (6376 days ago)
Resolved 03/03/2008 (6369 days ago)
Milestone
Patch No

History
03/03/2008 07:07:48 PM mrousseau (at) ate (dot) tm (dot) fr Comment #3 Reply to this comment
Thanks !



PHP patch  submitted now to the Kolab bugtracker : issue2519



Cheers,
03/03/2008 06:40:59 PM Gunnar Wrobel Comment #2
State ⇒ Resolved
Reply to this comment
Thanks for the fix. Did you also submit the PHP patch to the Kolab bug 
tracker? The location mentioned in the PHP bug does not seem to be 
accessible at the moment.



I commited a slightly modified version of your fix now. It will of 
course break foreign folder access on an unpatched php. pear.php 
should still work.



This problem makes it even more urgent to restructure the Kolab IMAP 
access. I hope it will be possible to use the Horde::IMAP parts. That 
would make most sense. But this will probably have to wait until Horde 
4.
02/25/2008 11:49:55 PM Jan Schneider State ⇒ Assigned
Priority ⇒ 2. Medium
Assigned to Gunnar Wrobel
 
02/19/2008 12:39:30 PM mrousseau (at) ate (dot) tm (dot) fr Comment #1
Priority ⇒ 3. High
Type ⇒ Enhancement
Summary ⇒ View share of other users
Queue ⇒ Kolab
State ⇒ New
Reply to this comment
the usage of IMAP getacl isn't working when we are not the propietary 
of a share.

The solution is to add this functionality to the php code of kolab 
with a patch developped by Diegows in the kolab installation : 
http://aspn.activestate.com/ASPN/Mail/Message/php-dev/3602193



and change the following code :



Replace in Horde/Share/kolab.php in function getPerm()

  // Perform the imap call

  $acl = $this->_imap->getACL($this->_folder);



by

  // Perform the imap call

  // Check if the getPerm comes from the owner

  // in this case we can use getACL to have all the right of the share

  // Otherwise we just ask the right of the current user for a folder

  if ($this->_owner==Auth::getAuth()){

          $acl = $this->_imap->getACL($this->_folder);

  }else{

          $acl = $this->_imap->getMYRIGHTS($this->_folder);

  }



And add a new function ini cclient.php (Framework/Kolab/IMAP/cclient.php) :

     /**

     * Retrieve the access rights from a folder

     *

     * @param string $folder  The folder to retrieve the ACLs from.

     *

     * @return mixed An array of rights if successfull, a PEAR error

     * otherwise.

     */

     function getMYRIGHTS($folder)

     {

         $user= Auth::getAuth();

         $result[$user]= @imap_myrights($this->_imap, $folder);

         if (!$result) {

             return PEAR::raiseError(sprintf(_("IMAP error. Folder: 
%s. Error: %s"), $folder, @imap_last_error()));

         }

         return $result;

     }


Saved Queries