listRequests now only shows the requests that concerns the given group.
authorLennard de Rijk <ljvderijk@gmail.com>
Sun, 25 Jan 2009 22:15:13 +0000
changeset 994 f05c02ba40fc
parent 993 99c46908b4b6
child 995 886c981fda2c
listRequests now only shows the requests that concerns the given group. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/models/group.py
--- a/app/soc/views/models/group.py	Sun Jan 25 22:05:25 2009 +0000
+++ b/app/soc/views/models/group.py	Sun Jan 25 22:15:13 2009 +0000
@@ -124,10 +124,16 @@
     # set the pagename to include the link_id
     page_name = '%s %s' %(page_name, kwargs['link_id'])
 
+    # get the group from the request
+    group_logic = params['logic']
+
+    group_entity = group_logic.getFromFields(**kwargs)
+
     role_names = params['roles_logic'].keys()
-
+    
     # list all incoming requests
     filter = {
+        'scope' : group_entity,
         'role': role_names,
         'state': 'new'
         }
@@ -145,6 +151,7 @@
 
     # list all outstanding invites
     filter = {
+        'scope' : group_entity,
         'role': role_names,
         'state': 'group_accepted'
         }
@@ -162,6 +169,7 @@
 
     # list all ignored requests
     filter = {
+        'scope' : group_entity,
         'role': role_names,
         'state': 'ignored'
         }