[imp] folder acl want to protect cyrus and owner

LALOT Dominique dom.lalot at gmail.com
Tue Jun 7 09:40:39 UTC 2011


Hello,

my backend is a cyrus imap 2.3.x server
I wanted to protect the owner of a mailbox and cyrus account from being
removed. So I tried a quick patch on imp/lib/Prefs/Ui.php line 606

                /* Create table of each ACL option for each user granted
                 * permissions; enabled indicates the right has been given
to
                 * the user. */
$login=$GLOBALS['registry']->getAuth();
                if ($index=='cyrus'|| $index==$login) $disable=1;
                else $disable=0;
                $rightsmbox = $acl->getRightsMbox($folder, $index);
                foreach (array_keys($rightslist) as $val) {
                    $entry['rule'][] = array(
                        'disable' => !$canEdit || !$rightsmbox[$val] ||
$disable,

On the interface, that's perfect, cyrus and owner appears in grey, so I
can't change. The bad news is: if I click on modify, cyrus and owner get
removed. I am not sure I can easily improve my patch. Looks like a bug
anyway as a disabled valued should not be removed.

Dom


-- 
Dominique LALOT
Ingénieur Systèmes et Réseaux
http://annuaire.univmed.fr/showuser.php?uid=lalot


More information about the imp mailing list