app/soc/views/models/project_survey.py
changeset 2734 f35f6f05c8c4
parent 2725 09b5bfc5707f
child 2740 4b8aa5b9cb23
--- a/app/soc/views/models/project_survey.py	Wed Aug 05 22:00:08 2009 +0200
+++ b/app/soc/views/models/project_survey.py	Thu Aug 06 10:48:44 2009 +0200
@@ -53,7 +53,11 @@
     rights['edit'] = [('checkIsSurveyWritable', project_survey_logic)]
     rights['delete'] = ['checkIsDeveloper'] # TODO: fix deletion of Surveys
     rights['list'] = ['checkDocumentList']
-    rights['record'] = ['checkIsDeveloper'] # TODO: proper access check
+    rights['record'] = [('checkHasAny', [
+        [('checkIsAllowedToViewProjectSurveyRecordAs',
+          [project_survey_logic, 'student', 'id']),
+        ('checkIsSurveyReadable', [project_survey_logic]),
+        ]])]
     rights['results'] = ['checkIsDeveloper'] # TODO: proper access check
     rights['take'] = [('checkIsSurveyTakeable', project_survey_logic),
                       ('checkIsAllowedToTakeProjectSurveyAs',