changeset 3138:2ba284b78861

fix a7fb50fd67f6, request.user must exist
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 27 Feb 2008 15:29:10 +0100
parents ee546a8aaa8f
children 0c0fd7c894a3
files MoinMoin/user.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/user.py	Wed Feb 27 15:28:29 2008 +0100
+++ b/MoinMoin/user.py	Wed Feb 27 15:29:10 2008 +0100
@@ -975,7 +975,7 @@
     def isSuperUser(self):
         """ Check if this user is superuser """
         request = self._request
-        if request.cfg.DesktopEdition and request.remote_addr == '127.0.0.1' and request.user.valid:
+        if request.cfg.DesktopEdition and request.remote_addr == '127.0.0.1' and request.user and request.user.valid:
             # the DesktopEdition gives any local user superuser powers
             return True
         superusers = request.cfg.superuser