[Zope] programatically adding users in zclass instances ??

Geir B Hansen geirh@funcom.com
Tue, 30 Nov 1999 15:06:58 +0100


hiyah zopistas !

ran into a bit of trouble and would really love if someone could help me
out a bit..

i made a Zclass 'artist' .. works nicely.
i changed the constructor object to add an acl_users folder inside the
newly created instance.... worked nicely..

I tried to change the constructor object to create a user inside the
newly created acl_users folder
 (using <dtml-call "manage_users([submit, REQUEST, RESPONSE])">  )
.. no luck ...

my constructor looks kind of like this :
(the request-calls are purely temporary for test-reasons)
.....
<dtml-with "artistzclass.createInObjectManager(REQUEST['id'], REQUEST)">
<dtml-call "manage_addUserFolder([PARENTS[1], REQUEST])">
<dtml-with "acl_users">
<dtml-call "REQUEST.set('submit','add')">
<dtml-call "REQUEST.set('name','testuser')">
<dtml-call "REQUEST.set('password','testpassw')">
<dtml-call "REQUEST.set('confirm','testpassw')">
<dtml-call "manage_users([submit, REQUEST, RESPONSE])">
</dtml-with>
</dtml-with>
....redirect stuff

- but it doesn't work
.. i get the bigest and most uncomprehensible trackeback ever instead..
(attached below)

Would really love a hint of what i'm doing wrong..

:-)
thanks
------------------------------------------------
Geir B Hansen
geirh@funcom.com
Web-designer / Graphic artist
Funcom Oslo
http://www.funcom.com
------------------------------------------------

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in
publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 201, in
zpublisher_exception_hook
    (Object: RoleManager)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 165, in
publish
  File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: artistzclass_add)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 102, in
call_object
    (Object: artistzclass_add)
  File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 145, in
__call__
    (Object: artistzclass_add)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
    (Object: artistzclass_add)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_With.py, line 148,
in render
    (Object: acl_users)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 321,
in eval
    (Object: manage_users([submit, REQUEST, RESPONSE]))
  File <string>, line 0, in ?
  File /usr/local/zope/lib/python/AccessControl/User.py, line 601, in
manage_users
    (Object: RoleManager)
  File /usr/local/zope/lib/python/App/special_dtml.py, line 120, in
__call__
    (Object: manage_main)
    (Info: /usr/local/zope/lib/python/AccessControl/mainUser.dtml)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
    (Object: manage_main)
  File /usr/local/zope/lib/python/App/special_dtml.py, line 120, in
__call__
    (Object: manage_tabs)
    (Info: /usr/local/zope/lib/python/App/manage_tabs.dtml)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
    (Object: manage_tabs)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_With.py, line 148,
in render
    (Object: _(manage_options=filtered_manage_options()))
  File /usr/local/zope/lib/python/DocumentTemplate/DT_In.py, line 691,
in renderwob
    (Object: manage_options)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 321,
in eval
    (Object: URL[-(_.len(action)):]==action or
                URL[-17:]=='/manage_workspace' and _['sequence-start'])
  File <string>, line 0, in ?
NameError: (see above)