[turba] Restrincting to a shared read-only address book

Luigi Iotti horde at iotti.biz
Wed May 16 20:47:09 UTC 2007


Hi all

I'm new to the list. I'm preparing a locked-in IMP-4.1.3 + Turba-2.1.2
environment. All the prefs are locked by default.
I'd like to have only one address book, which should be shared and read-only
for all the users, except for an "admin" user who can update the address
book. I obtained almost everything I wanted: I created the admin user,
created the localsql address book, shared it in the admin user, applied only
show and read permissions for others.
My users see the address book and are able to use it. They can use only this
address book since I set both the addressbooks and default_dir prefs to
localsql:admin.
The only thing I can't get rid of is the "My Address Book" button on the top
left of the Turba menu bar and, if I click on it, I am presented with the
options to create a new address book or modify the user's existing one.
These options are not usable at all, since the user only sees the admin's
address book, but their presence is annoying.
On the other hand, having a look at the code it seems that this button is
showed because the localsql source is configured with use_shares = true . I
can't change this since admin needs it to be able to share the address book.

The only way I found to get rid of the button was to comment out the
following lines from lib/Turba.php :
if ($GLOBALS['haveShare']) {
   $menu->add(Horde::applicationUrl('addressbooks.php'), _("_My Address
Books"), 'turba.png');
}

But I don't like to mess with the code. Is there a way to have only the
admin user to own an address book, or to map the use_shares attribute on a
per-user basis, or some other trick to make that button disappear?
Or maybe, a new pref could be introduced to force $GLOBALS['haveShare'] to
be false even if the source has use_shares = true ?

Thanks
Luigi



More information about the turba mailing list