Description
The handleData method of the UserSettingsHandler class in userform.py raises KeyError exceptions when trying to access form fields that are listed in the user_form_disable list in multiconfig.py.
Steps to reproduce
- Add the email field in user_form_disable list in multiconfig.py
Then when the email support is enabled, try pressing "Mail Account Details" in the UserPreferences page.
- The operation will fail with the message that a correct e-mail address has to be provided
Close inspection shows that handleData raises a KeyError because the email field is not part of the form dictionary
Example
Component selection
- general
Details
MoinMoin Version |
1.6.0 |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
Did you also disable the name field? It should use this field if the email field raises a KeyError.
Looks like the password fields have a similar problem - from a moin-user mail:
Authentication against our domain controller now works just fine. As
the next step I now want to change the UserPreferences page according
to the ApacheOnWin32withDomainAuthentication description.
After adding the following lines to my wikiconfig.py I always get an
error telling me that I have to enter a password after saving my
preferences:
show_login = 0
user_form_remove = ['password', 'password2', 'logout',]
user_checkbox_remove = ['disabled',]
Then I edited the UserPreferences page and removed the sections
"Creating a profile" and "Resetting password". Now after entering my
preference data and click on save I no longer get the error message
about the missing password, but nothing is being saved at all.I can't reproduce neither of this issues with tip. -- FedericoSchwindt 2008-04-23 10:52:21
Which tip, which changeset, which release ?
-- ReimarBauer 2008-04-23 12:31:54
moin 1.7 as today. -- FedericoSchwindt 2008-04-23 14:14:35
it looks like show_login does not behave as expected in 1.7 changeset 3519 db35fff4d5ec -- ReimarBauer 2008-04-23 20:19:22
In 1.7 show_login is gone and the user preferences has changed enough so neither of these apply. -- FedericoSchwindt 2008-04-24 08:32:43
Any idea how to remove the login/logout button from the theme now? -- ReimarBauer 2008-04-24 09:33:33
For what I've checked, it will be done automatically by the auth module you decide to use, and it'll be up to the module itself to remove login/logout. If you want to do it for some other reason, you'll have to subclass BaseAuth. Check auth/__init__.py. -- FedericoSchwindt 2008-04-24 16:46:24
Plan
- Priority:
- Assigned to:
- Status: fixed since 1.7 2008-04-23
