acl_users fails if an object named 'user' exists

Bug #143281 reported by Florent Guillaume
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Low
Unassigned

Bug Description

If an object named 'user' exists alongside a user folder, the editUser.dtml page fails to display:

Request URL http://localhost:8080/acl_users/manage_users
     * Module ZPublisher.Publish, line 101, in publish
     * Module ZPublisher.mapply, line 88, in mapply
     * Module ZPublisher.Publish, line 39, in call_object
     * Module AccessControl.User, line 939, in manage_users
     * Module Shared.DC.Scripts.Bindings, line 306, in __call__
     * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
     * Module App.special_dtml, line 175, in _exec
     * Module DocumentTemplate.DT_Util, line 198, in eval
       __traceback_info__: user
     * Module <string>, line 0, in ?
 AttributeError: name

This is due to references to user.name in the DTML.

Tags: bug zope
Revision history for this message
Florent Guillaume (efge) wrote :
Revision history for this message
Stefan H. Holek (stefanholek) wrote :

Uploaded: editUser.patch

I have attached a patch.

Revision history for this message
Florent Guillaume (efge) wrote :

I'd rather just change the DTML. Subclasses of User may want to call the same template with original semantics and would fail. Or some overloaded template would be surprised to receive user__...

Revision history for this message
Andreas Jung (ajung) wrote :

I agree with efge that the patch is not the recommended way to fix such issues.

Tres Seaver (tseaver)
Changed in zope2:
status: New → Triaged
Changed in zope2:
status: Triaged → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.