Changeset b866a27 in github


Ignore:
Timestamp:
Jun 28, 2012 4:43:50 AM (11 months ago)
Author:
Aleksander Machniak <alec@…>
Branches:
master, HEAD
Children:
d901205
Parents:
a60d139
Message:

Fix handling of MYRIGHTS on private namespace roots - fixes issue where
in ACL plugin it wasn't possible to share INBOX folder (when it was a namespace prefix).

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/acl/acl.php

    r48e9c14 rb866a27  
    129129    function folder_form($args) 
    130130    { 
     131        $mbox_imap = $args['options']['name']; 
     132        $myrights  = $args['options']['rights']; 
     133 
    131134        // Edited folder name (empty in create-folder mode) 
    132         $mbox_imap = $args['options']['name']; 
    133135        if (!strlen($mbox_imap)) { 
    134136            return $args; 
     
    140142        } 
    141143*/ 
    142         // Namespace root 
    143         if ($args['options']['is_root']) { 
    144             return $args; 
    145         } 
    146  
    147144        // Get MYRIGHTS 
    148         if (!($myrights = $args['options']['rights'])) { 
    149             return $args; 
    150         } 
    151  
    152         // Do nothing if no ACL support 
    153         if (!$this->rc->storage->get_capability('ACL')) { 
     145        if (empty($myrights)) { 
    154146            return $args; 
    155147        } 
  • plugins/acl/package.xml

    r48e9c14 rb866a27  
    1414                <active>yes</active> 
    1515        </lead> 
    16         <date>2012-03-13</date> 
     16        <date>2012-06-28</date> 
    1717        <version> 
    18                 <release>0.8</release> 
     18                <release>0.9</release> 
    1919                <api>0.7</api> 
    2020        </version> 
  • program/include/rcube_imap.php

    r6bb44a6 rb866a27  
    32303230        $cached = $this->get_cache($cache_key); 
    32313231 
    3232         if (is_array($cached)) 
     3232        if (is_array($cached)) { 
    32333233            return $cached; 
     3234        } 
    32343235 
    32353236        $acl       = $this->get_capability('ACL'); 
     
    32683269        $options['attributes'] = $this->folder_attributes($folder, true); 
    32693270        $options['namespace']  = $this->folder_namespace($folder); 
    3270         $options['rights']     = $acl && !$options['is_root'] ? (array)$this->my_rights($folder) : array(); 
    32713271        $options['special']    = in_array($folder, $this->default_folders); 
    32723272 
    3273         // Set 'noselect' and 'norename' flags 
     3273        // Set 'noselect' flag 
    32743274        if (is_array($options['attributes'])) { 
    32753275            foreach ($options['attributes'] as $attrib) { 
     
    32843284        } 
    32853285 
     3286        // Get folder rights (MYRIGHTS) 
     3287        if ($acl && !$options['noselect']) { 
     3288            // skip shared roots 
     3289            if (!$options['is_root'] || $options['namespace'] == 'personal') { 
     3290                $options['rights'] =  (array)$this->my_rights($folder); 
     3291            } 
     3292        } 
     3293 
     3294        // Set 'norename' flag 
    32863295        if (!empty($options['rights'])) { 
    32873296            $options['norename'] = !in_array('x', $options['rights']) && !in_array('d', $options['rights']); 
Note: See TracChangeset for help on using the changeset viewer.