[Zope-dev] LoginManager ownership bug!

Jonas Juselius jonas@iki.fi
Thu, 5 Oct 2000 10:49:56 +0300


Hola,

There seems to be a problem with the ownership model in Zope (or ZPatterns). 

The problem is the following: I have implemented a nice login system based on
the LoginManager and SQL methods. I would like to make this acl_users the
top level user folder, but... then hell brakes lose... 

The problem has to do with the ownership of the acl_users. When the
LoginManager (acl_users) is created it sets the _owner attribute to
UnownableOwner. This is fine, for if the acl_users folder is owned it results
in various errors: Excessive recursion or ValueError: unpack list of wrong
size (when logging in), IndexError: list index out of range (when trying to
view ownership info of acl_users). This has to do with the top-level folder
being unowned, it seems. There is no problem with the LoginManager being owned
in a folder which is owned itself.

The problem is that the acl_users folder becomes _owned_ (by whom I don't
know) every time Zope is restarted, or when any method is edited or added in
the acl_users folder. It seems that the _owned attribute is not persistent, or
that something, somewhere changes it. I have a dirty fix for the moment,
consisting of an external method which sets the ownership of acl_users to
UnownableOwner. This is however a far from satisfying solution...

Another thing which I have tried to do, is to add  support for local roles to 
the LoginManager. At first it looked rather simple, but then I realized that
it wasn't really _that_ simple, and dropped it because I don't have time... It
would however be nice to have local roles support in the LoginManager, as it
would make it more complete.

I am currently using Zope-2.2.1 (and Zope-2.2.2), ZPatterns-0-4-2a1 and 
LoginManager-0_8_7a1.

Best regards, 
              .jonas.


--
***************************************************************************
 Jonas Juselius                       e-mail...: jonas@iki.fi
                                      voice....: +358 9 191 40188 
 P.O. Box 55/ Department of Chemistry GSM......: 040 506 6599 
 FIN-00014 University of Helsinki     fax......: +358 9 191 40169 
 FINLAND                              http://www.iki.fi/jonas   

 Home address:
  Helsinginkatu 16 B 42               tel......: +358 9 753 3369
  00500 Helsinki
  FINLAND
***************************************************************************
[ GPG public key: http://www.iki.fi/jonas/pubkey.asc ]