[ZWeb] Problems with /acl_users

Jim Fulton jim@digicool.com
Tue, 26 Sep 2000 08:20:02 -0400


Martijn Pieters wrote:
> 
> I can't list all the usernames in /acl_users anymore:

Dang.
 
> Error type:  AttributeError
> Error value: 'BTreeItems' object has no attribute 'sort'
> 
> Traceback (innermost last):
>   (Snipped to relevancy)
>   File /usr/local/dc/Zope2/lib/python/AccessControl/User.py, line 681, in user_names
>     (Object: RoleManager)
>   File /usr/local/dc/Zope2/lib/python/AccessControl/User.py, line 729, in getUserNames
>     (Object: RoleManager)
> AttributeError: (see above)

I guess that, for now, this method should convert it's
names to a list if it isn't one already. Of, course, 
listing all the names in a 1200-user database is lame, 
but we have to live with this lamosity for now.

Shane, can you fix this?

> It seems that someone changed the BTree implementation used in the user
> folders.

Actually, the user folder was changed to use a BTree rather
than a dictionary. Shane did that with my, um, guidence.
The use of a dictionary caused the site to have too many
objects in the cache.

> I tried to change the domains field for a certain user, and
> because the return action of that method shows you all users, I can't do
> it through the web.
> 
> If I use the Monitor to do it, and try and commit the changes, Zope hangs.
> get_transaction().commit() never returns.

Note that you can now use ZEO to do this sort of thing.
Basically, go to the lib/python directory and:

  INSTANCE_HOME=/usr/local/dc/org python
  import Zope
  app=Zope.app()
  .....
  get_transaction().commit()

Because zope.org is running ZEO (we still need to change the
mounted wikis to use ZEO) you can get to the process from Python
without shutting it down! This is much better than using the 
monitor client.

Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.