changeset 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 fe472a24fbcc
children 74216148209d
files MoinMoin/script/migration/wikiutil160a.py MoinMoin/security/textcha.py
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/migration/wikiutil160a.py	Thu Jun 25 14:48:47 2009 +0200
+++ b/MoinMoin/script/migration/wikiutil160a.py	Thu Jun 25 14:50:45 2009 +0200
@@ -648,7 +648,8 @@
     @rtype: bool
     @return: true if page is a system page
     """
-    return (request.dicts.has_member('SystemPagesGroup', pagename) or
+    groups = request.groups
+    return (u'SystemPagesGroup' in groups and pagename in groups[u'SystemPagesGroup']) or
         isTemplatePage(request, pagename))
 
 
--- 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: