diff MoinMoin/security/textcha.py @ 4822:d44a9c23438c

Groups2009: script.migration.wikiutil160a and security.textcha work with the new groups code.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Thu, 25 Jun 2009 14:50:45 +0200
parents 5ad5753ae311
children 9d510417add0
line wrap: on
line diff
--- a/MoinMoin/security/textcha.py	Thu Jun 25 14:48:47 2009 +0200
+++ b/MoinMoin/security/textcha.py	Thu Jun 25 14:50:45 2009 +0200
@@ -46,10 +46,11 @@
     def _get_textchas(self):
         """ get textchas from the wiki config for the user's language (or default_language or en) """
         request = self.request
+        groups = request.groups
         cfg = request.cfg
         user = request.user
         disabled_group = cfg.textchas_disabled_group
-        if disabled_group and user.name and request.dicts.has_member(disabled_group, user.name):
+        if disabled_group and user.name and disabled_group in groups and user.name in groups[disabled_group]:
             return None
         textchas = cfg.textchas
         if textchas: