diff MoinMoin/security/textcha.py @ 4829:9d510417add0

Groups2009: Instead of checking that some group is defined in a request.groups and then check that some member is in that group request.groups.get method is used.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sat, 27 Jun 2009 13:11:35 +0200
parents d44a9c23438c
children 5d5ec86e40a2
line wrap: on
line diff
--- a/MoinMoin/security/textcha.py	Sat Jun 27 13:07:36 2009 +0200
+++ b/MoinMoin/security/textcha.py	Sat Jun 27 13:11:35 2009 +0200
@@ -50,7 +50,7 @@
         cfg = request.cfg
         user = request.user
         disabled_group = cfg.textchas_disabled_group
-        if disabled_group and user.name and disabled_group in groups and user.name in groups[disabled_group]:
+        if disabled_group and user.name and user.name in groups.get(disabled_group, []):
             return None
         textchas = cfg.textchas
         if textchas: