[turba] SQL-based Adressbook, case-sensitive owner

Joerg Friedrich Joerg.Dieter.Friedrich at uni-konstanz.de
Mon May 26 13:09:39 PDT 2003


Hi!

ATM we are migrating from Horde1/Imp2 to Horde2/imp3/turba :-)

I encountered one problem:
Our users use as login-name their Email-Alias (something like
Firstname.Surname) which is case-IN-sensitive. 
if address book entries are created with one spelling of their alias 
and they log in with another spelling they can see and use all entries.
But they can only edit and delete those entries which are created with
the same spelling they are currently logged in.

I know that the owner_id field is a strict field, but this is necessary.
For now I changed the isEditable()-function in lib/AbstractObject.php to

function isEditable()
{
  if ($this->source->readonly) {
    return false;
  } else if ($this->hasValue('__owner') &&
     strtolower($this->getValue('__owner')) != strtolower(Auth::getAuth())) {
    return false;
  }
  return true;
}

This is just a work-around. What is recommended?
-- 
Heute ist nicht alle Tage, ich komm' wieder, keine Frage!!!

   Joerg

Goals... Plans... they're fantasies, they're part of a dream world...
		-- Wally Shawn


More information about the turba mailing list