[Tickets #6287] View share of other users

bugs at horde.org bugs at horde.org
Tue Feb 19 12:39:31 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=6287
-----------------------------------------------------------------------
 Ticket             | 6287
 Created By         | mrousseau at ate.tm.fr
 Summary            | View share of other users
 Queue              | Kolab
 Type               | Enhancement
 State              | New
 Priority           | 3. High
 Milestone          | 
 Patch              | 
 Owners             | 
-----------------------------------------------------------------------


mrousseau at ate.tm.fr (2008-02-19 07:39) wrote:

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;
    }




More information about the bugs mailing list