app/soc/views/models/survey.py
changeset 2447 dae6715a2f19
parent 2442 dd1f94c3594c
child 2448 325e08ee9d25
--- a/app/soc/views/models/survey.py	Mon Jun 29 15:19:28 2009 +0200
+++ b/app/soc/views/models/survey.py	Mon Jun 29 15:44:33 2009 +0200
@@ -102,13 +102,12 @@
 
     rights = access.Checker(params)
     rights['any_access'] = ['allow']
-    rights['show'] = ['checkIsSurveyReadable']
+    rights['show'] = [('checkIsSurveyReadable', survey_logic)]
     rights['create'] = ['checkIsUser']
-    rights['edit'] = ['checkIsSurveyWritable']
-    rights['delete'] = ['checkIsSurveyWritable']
+    rights['edit'] = [('checkIsSurveyWritable', survey_logic)]
+    rights['delete'] = [('checkIsSurveyWritable', survey_logic)]
     rights['list'] = ['checkDocumentList']
     rights['pick'] = ['checkDocumentPick']
-    rights['grade'] = ['checkIsSurveyGradable']
 
     new_params = {}
     # TODO(ajaksu) pass logic in a way views can use them
@@ -720,6 +719,7 @@
       submenus.append(submenu)
     return submenus
 
+  # TODO the following two methods should move to GradingProjectSurvey
   def activate(self, request, **kwargs):
     """This is a hack to support the 'Enable grades' button.
     """