[ZWeb] Problems with /acl_users
Tue, 26 Sep 2000 16:02:26 +0200
On Tue, Sep 26, 2000 at 09:13:22AM -0400, Shane Hathaway wrote:
> Here's what we did, using a simple Python interpreter. (Of course this
> only works if you're logged in to www.zope.org.)
> INSTANCE_HOME=/usr/local/dc/org python
> import ZServer, Zope, BTree
> app = Zope.app()
> newdata = BTree.BTree()
> for key, value in app.acl_users.data:
> newdata[key] = value
> app.acl_users.data = newdata
> The process could be reversed by switching to a PersistentMapping again.
I can't connect to the server, it seems:
>>> import Zope
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/usr/local/dc/Zope2/lib/python/Zope/__init__.py", line 118, in ?
File "/usr/local/dc/zope_soft/lib/python/ZODB/DB.py", line 155, in __init__
File "/usr/local/dc/zope_soft/lib/python/ZEO/ClientStorage.py", line 457, in tpc_begin
if not self._connected: raise ClientDisconnected()
> > > I can't list all the usernames in /acl_users anymore:
> > >
> > > Error type: AttributeError
> > > Error value: 'BTreeItems' object has no attribute 'sort'
> It would be possible to fix this by calling list() on the returned set.
This means changing AccessControl/User.py, or implementing an External
Method version of getUserNames() (and getUsers())
> We thought PersistentMapping and BTree had a similar enough interface.
> Again, this can be fixed, but perhaps we were overconfident because of our
> success in "exorcising" the haunted zope.org. /Members is now a
> BasicBTreeFolder, which results in fewer ghosts.
I saw this as well. I believe that __getattr__ isn't implemented on
BTreeFolder? app.Members.mj didn't work.
| Software Engineer mailto:email@example.com
| Digital Creations http://www.digicool.com/
| Creators of Zope http://www.zope.org/