[Zope] manage_users - Error in acl_users
JP Glutting
JPGlutting@cspt.es
Thu, 18 Feb 1999 12:56:24 MET-1MEST
Hi,
I have a DTML page that adds users to a folder, (trying to) give them only
a specific, limited role. The code in question looks like this. I know it is
overkill, but it is more clear this way. (inId passes the folder to give
access to):
<!--#call "REQUEST.set('name', name)"-->
<!--#call "REQUEST.set('password', password)"-->
<!--#call "REQUEST.set('confirm', confirm)"-->
<!--#call "REQUEST.set('roles', 'Student')"-->
<!--#call "REQUEST.set('domains', '')"-->
<!--#call "_.getitem(_['inID']).acl_users.manage_users(submit='Add',
REQUEST=REQUEST)"-->
When the 'roles' variable is set to '', it works fine, but there are no roles
for the user (obviously). When I set a role, like in this code, it adds the
user, but when I go to the acl_users folder to look at the user details, I get
an error, with this traceback:
Sorry, an error occurred.<p>
<!--
Traceback (innermost last):
File C:\Archivos de programa\CochraneSCC\lib\python\ZPublisher\Publish.py,
line 879, in publish_module File C:\Archivos de
programa\CochraneSCC\lib\python\ZPublisher\Publish.py, line 595, in publish
(Info: /Castellano/Courses/EBM/acl_users/manage_users)
File C:\Archivos de programa\CochraneSCC\lib\python\AccessControl\User.py,
line 564, in manage_users
(Object: Navigation)
File C:\Archivos de programa\CochraneSCC\lib\python\Globals.py, line 234, in
__call__
(Object: _editUser)
File C:\Archivos de
programa\CochraneSCC\lib\python\DocumentTemplate\DT_String.py, line 514, in
__call__
(Object: _editUser)
File C:\Archivos de programa\CochraneSCC\lib\python\DocumentTemplate\DT_In.py,
line 687, in renderwob
(Object: valid_roles)
File C:\Archivos de
programa\CochraneSCC\lib\python\DocumentTemplate\DT_Util.py, line 268, in eval
(Object: _vars['sequence-item'] in user.roles)
File <string>, line 0, in ?
TypeError: string member test needs char left operand
-->
Has anyone seen this, and is there something I can do to
make this work?
I am also wondering if this is not related to a problem the Brian Hooper posted
on Jan 26, where he had trouble changing data for users. Brian, could you see
at the details of the acl_users entries from the /manage screen?
Thanks,
JP
jpglutting @ csptDOTes