Description

As a superuser, changing the preferences for another user leads to replacement of superuser-preferences instead of preferences for the other user.

Steps to reproduce

  1. Login in as the Superuser
  2. Go to UserPreferences

  3. Select a different User in the SelectUser dropdown menu

  4. Change a preference for that other user (tested this by changing the e-mail address)
  5. Save

Result: The preferences of the Superuser get overwritten with the settings of the (presumably) edited user. The preferences for the selected User remain unchanged. All preferences get replaced, not just the one changed.

Example

Details

MoinMoin Version

1.5.2 + patch to fix uploading attachments I found in this Wiki

OS and Version

Linux 2.4.30

Python Version

2.4.1

Server Setup

Apache 1.3.34 using mod_python 2.7.11, Apache is doing NTLM pre-authentication

Server Details

Apache has many different modules loaded, including mod_perl for NTLM authentication, details available on request, but probably not related

wikiconfig.py has {{{auth=[http] user_autocreate = 1}}}

Workaround

Do not try to save preferences for a different user.

Discussion

It is rather unpleasant to loose, eg., the subscribed-to pages setting.

This is caused by this code relying on working cookie auth:

                self.request.user = theuser
                self.request.setCookie()
                return  _("Use UserPreferences to change settings of the selected user account")

If you allow http auth only, we can't convince apache that you are another user now.

Are there any other possibilities to get this to work now? Like adding "cookie" as another authentication method?

Try auth = [moin_cookie, http].

Re-opening, since it was marked MoinMoinNoBug without any explanation. (Yes, I did see a mention of moin_cookie being documented now in the change comment, but should a preson have to look there to see the reason?) Also, a link to that documentation and maybe a hint on how that resolves the problem would be nice. -- SteveDavison 2007-10-11 01:42:19

Well, moin has no control about http auth, this is done by the server and the server sets some env vars moin uses. Moin has no means to change the user when http auth is the only auth method. But for being able to switch users, moin needs that control, so it can only do it for the auth thing it itself controls, and this is cookie based auth. -- ThomasWaldmann 2007-10-11 06:43:41

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/SavingUserPreferencesAsSuperuser (last edited 2007-10-29 19:20:19 by localhost)