[turba] contact ownership issue

jlewis@lewis.org jlewis@lewis.org
Tue, 6 Aug 2002 20:02:24 -0400 (EDT)


I just ran into an interesting contact ownership issue in turba-1.1.

Suppose a user logs into IMP as user and creates some contacts.  Later, 
they log in as User and create a few more.  Then later, they log in as 
USER.  Logged in as USER, they see all contacts created by user and User, 
but turba doesn't think they own the contacts, so they can't edit/delete 
them.

Is there anything wrong with doing the following:

--- lib/AbstractObject.php.orig Tue Aug  6 19:17:01 2002
+++ lib/AbstractObject.php      Tue Aug  6 19:24:25 2002
@@ -101,7 +101,7 @@
         if ($this->source->readonly) {
             return false;
         } else if ($this->hasValue('__owner') &&
-                   $this->getValue('__owner') != Auth::getAuth()) {
+                   (strcasecmp($this->getValue('__owner'),Auth::getAuth()))) {
             return false;
         }


----------------------------------------------------------------------
 Jon Lewis *jlewis@lewis.org*|  I route
 System Administrator        |  therefore you are
 Atlantic Net                |  
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________