app/soc/views/models/grading_project_survey.py
changeset 2734 f35f6f05c8c4
parent 2725 09b5bfc5707f
child 2744 6f5e303f64b5
equal deleted inserted replaced
2733:054a2227249c 2734:f35f6f05c8c4
    53     rights['show'] = [('checkIsSurveyReadable', grading_survey_logic)]
    53     rights['show'] = [('checkIsSurveyReadable', grading_survey_logic)]
    54     rights['create'] = ['checkIsUser']
    54     rights['create'] = ['checkIsUser']
    55     rights['edit'] = [('checkIsSurveyWritable', grading_survey_logic)]
    55     rights['edit'] = [('checkIsSurveyWritable', grading_survey_logic)]
    56     rights['delete'] = ['checkIsDeveloper'] # TODO: fix deletion of Surveys
    56     rights['delete'] = ['checkIsDeveloper'] # TODO: fix deletion of Surveys
    57     rights['list'] = ['checkDocumentList']
    57     rights['list'] = ['checkDocumentList']
    58     rights['record'] = ['checkIsDeveloper'] # TODO: proper access check
    58     rights['record'] = [('checkHasAny', [
       
    59         [('checkIsAllowedToViewProjectSurveyRecordAs',
       
    60           [grading_survey_logic, 'mentor', 'id']),
       
    61         ('checkIsSurveyReadable', [grading_survey_logic]),
       
    62         ]])]
    59     rights['results'] = ['checkIsDeveloper'] # TODO: proper access check
    63     rights['results'] = ['checkIsDeveloper'] # TODO: proper access check
    60     rights['take'] = [('checkIsSurveyTakeable', grading_survey_logic),
    64     rights['take'] = [('checkIsSurveyTakeable', grading_survey_logic),
    61                       ('checkIsAllowedToTakeProjectSurveyAs',
    65                       ('checkIsAllowedToTakeProjectSurveyAs',
    62                        [grading_survey_logic, 'mentor', 'project'])]
    66                        [grading_survey_logic, 'mentor', 'project'])]
    63 
    67