diff MoinMoin/user.py @ 449:8ec16f62e989

Moved type check of the superuser setting. imported from: moin--main--1.5--patch-453
author Alexander Schremmer <alex@alexanderweb.de.tla>
date Sat, 18 Feb 2006 16:12:14 +0000
parents 45924beef130
children 4be11eec9c4f
line wrap: on
line diff
--- a/MoinMoin/user.py	Sat Feb 18 15:31:50 2006 +0000
+++ b/MoinMoin/user.py	Sat Feb 18 16:12:14 2006 +0000
@@ -902,11 +902,8 @@
 
     def isSuperUser(self):
         superusers = self._request.cfg.superuser
-        # some people managed to WRONGLY assign a string instead of a list and
-        # then dumb things may happen when username is a substring of cfg.superuser
-        islisttype = isinstance(superusers, (list, tuple))
-        return self.valid and self.name and \
-                islisttype and self.name in superusers
+        assert isinstance(superusers, (list, tuple))
+        return self.valid and self.name and self.name in superusers
 
     def host(self):
         """ Return user host """