[Kolab-devel] WAS: Calendar folder created by Outlook / Toltec invisible in Horde

Stephane Konstantaropoulos skonstant at sgul.ac.uk
Tue Oct 30 17:01:02 CET 2007


Quoting Stephane Konstantaropoulos <skonstant at sgul.ac.uk>:

>> >
>> > I just do not see the calendar at all in the list. I see the shared
>> > calendars though, just not the one owned by the user.
>>
>> Are there any conflicting "folder-type" settings? The Kontact client
>> for example creates duplicate "TYPE.default" folders:
>>
>> https://www.intevation.de/roundup/kolab/issue2133
>>
>> Horde is capable of identifying ONE default folder. If there are
>> several, the second will be invisible.
>>
>> Can you check with cyradm if you have such a situation? Or is there
>> really only one "event.default" folder?
>>
>> What are the ACL settings on the event folders of your users?
>>
>> Cheers,
>>
>> Gunnar
>>
>
> I think that could be the issue, one user had access to someone else's
> Calendar, also marked "event.default"; in the calendar list, only the shared
> one appears. When ticked, it is the events of the user's calendar that are
> shown.
>
> The user's calendar is also "event.default", maybe that's the issue, you
> should check for .default only in the users namespace perhaps, I'll try this
> out later in the listShares function.
>
>

Here's the fix, check if the mailbox belongs to the user, if not,  
don't consider the "default" attribute:

lib/Horde/Share/kolab.php

from 1707:

             $folders_preg = ';shared\.|INBOX[/]?|user/[^/]+[/]?[^@]+(@.*)?;';
->            $shared_preg = ';shared\.|user/[^/]+[/]?[^@]+(@.*)?;';

             foreach ($folder_list as $folder) {

                 // Check for a correct IMAP folder name
                 preg_match($folders_preg, $folder, $matches);
                 if (!isset($matches)) {
                     continue;
                 }
->                $shared = false;
->                preg_match($shared_preg, $folder, $shared_match);
->                if (isset($shared_match)) {
->                    $shared = true;
->                }

                 // Retrieve the folder annotation
                 $annotation =  
$this->_imap->getAnnotation(KOLAB_ANNOT_FOLDER_TYPE, 'value.shared',  
$folder);
                 if (is_a($annotation, 'PEAR_Error')) {
                     return $annotation;
                 }

                 // If there is no annotation then we treat it as a standard
                 // mail folder (i.e. we ignore it).
                 if (empty($annotation)) {
                     continue;
                 }

                 // If the folder is of the correct type then we add it to our
                 // list of folders that should correspond to a share. Here we
                 // get any other additional information we may need, such as
                 // whether the folder was previously mapped to a share, its
                 // ACL, its owner (if it is a shared folder) and its display
                 // name.
                 $type = explode('.', $annotation);
                 if ($type[0] == $app_consts['mime_type_suffix']) {
->                    if (isset($type[1]) && $type[1] == 'default' &&  
! $shared) {
                         $this->_default = $folder;
                         array_push($shares,  
$this->buildShareId(Auth::getAuth()));
                     } else {
                         array_push($shares,  
$this->buildShareId(rawurlencode($folder)));
                     }
                 }
             }



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Signature num?rique PGP
URL: <http://lists.kolab.org/pipermail/devel/attachments/20071030/6b97af0a/attachment.sig>


More information about the devel mailing list