changeset 4805:6a109416e2b2

Groups2009: cfg.config_groups was removed.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Thu, 11 Jun 2009 14:08:13 +0200
parents 3cea38408fe6
children dcbdf7e5660d
files MoinMoin/_tests/wikiconfig_groups.py MoinMoin/groups/backends/_tests/test_config_group.py MoinMoin/groups/backends/config_group.py
diffstat 3 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/wikiconfig_groups.py	Thu Jun 11 14:02:19 2009 +0200
+++ b/MoinMoin/_tests/wikiconfig_groups.py	Thu Jun 11 14:08:13 2009 +0200
@@ -12,5 +12,4 @@
 
 class Config(LocalConfig):
     group_manager_init = lambda self, request: GroupManager(wiki_group.Backend(request))
-    config_groups = {}
 
--- a/MoinMoin/groups/backends/_tests/test_config_group.py	Thu Jun 11 14:02:19 2009 +0200
+++ b/MoinMoin/groups/backends/_tests/test_config_group.py	Thu Jun 11 14:08:13 2009 +0200
@@ -21,8 +21,8 @@
     class Config(wikiconfig.Config):
 
         def group_manager_init(self, request):
-            self.config_groups = BackendTest.test_groups
-            return GroupManager(config_group.Backend(request))
+            groups = BackendTest.test_groups
+            return GroupManager(config_group.Backend(request, groups))
 
 
 coverage_modules = ['MoinMoin.groups.backends.config_group']
--- a/MoinMoin/groups/backends/config_group.py	Thu Jun 11 14:02:19 2009 +0200
+++ b/MoinMoin/groups/backends/config_group.py	Thu Jun 11 14:08:13 2009 +0200
@@ -32,19 +32,14 @@
 
 class Backend(BaseBackend):
 
-    def __init__(self, request, groups=None):
+    def __init__(self, request, groups):
         """
         @param groups: Dictionary of groups where key is group name,
         and value is list of members of that group.
-
-        If <groups> is not defined request.cfg.config_groups is used.
         """
         super(Backend, self).__init__(request)
 
-        if groups is not None:
-            self._groups = groups
-        else:
-            self._groups = request.cfg.config_groups
+        self._groups = groups
 
     def __contains__(self, group_name):
         backend_group_name = self.to_backend_name(group_name)