app/soc/views/models/project_survey.py
changeset 2722 1ec0af4ddd72
parent 2686 ada26cef0b06
child 2725 09b5bfc5707f
equal deleted inserted replaced
2721:e32118b84718 2722:1ec0af4ddd72
    51     rights['show'] = [('checkIsSurveyReadable', project_survey_logic)]
    51     rights['show'] = [('checkIsSurveyReadable', project_survey_logic)]
    52     rights['create'] = ['checkIsUser']
    52     rights['create'] = ['checkIsUser']
    53     rights['edit'] = [('checkIsSurveyWritable', project_survey_logic)]
    53     rights['edit'] = [('checkIsSurveyWritable', project_survey_logic)]
    54     rights['delete'] = ['checkIsDeveloper'] # TODO: fix deletion of Surveys
    54     rights['delete'] = ['checkIsDeveloper'] # TODO: fix deletion of Surveys
    55     rights['list'] = ['checkDocumentList']
    55     rights['list'] = ['checkDocumentList']
    56     rights['results'] = [('checkIsSurveyWritable', project_survey_logic)]
    56     rights['record'] = ['checkIsDeveloper'] # TODO: proper access check
       
    57     rights['results'] = ['checkIsDeveloper'] # TODO: proper access check
    57     rights['take'] = [('checkIsSurveyTakeable', project_survey_logic),
    58     rights['take'] = [('checkIsSurveyTakeable', project_survey_logic),
    58                       ('checkIsAllowedToTakeProjectSurveyAs',
    59                       ('checkIsAllowedToTakeProjectSurveyAs',
    59                        [project_survey_logic, 'student', 'project'])]
    60                        [project_survey_logic, 'student', 'project'])]
    60     rights['send_reminder'] = ['checkIsDeveloper'] #TODO: proper access check
    61     rights['send_reminder'] = ['checkIsDeveloper'] #TODO: proper access check
    61 
    62 
   222     content = lists.getListContent(request, student_project_params, fields)
   223     content = lists.getListContent(request, student_project_params, fields)
   223     contents = [content]
   224     contents = [content]
   224 
   225 
   225     return self._list(request, student_project_params, contents, page_name)
   226     return self._list(request, student_project_params, contents, page_name)
   226 
   227 
   227 
       
   228   @decorators.merge_params
   228   @decorators.merge_params
   229   @decorators.check_access
   229   @decorators.check_access
   230   def sendReminder(self, request, access_type, page_name=None,
   230   def sendReminder(self, request, access_type, page_name=None,
   231                    params=None, **kwargs):
   231                    params=None, **kwargs):
   232     """Starts the task to send out reminders for the Survey given in kwargs.
   232     """Starts the task to send out reminders for the Survey given in kwargs.
   272 create = decorators.view(view.create)
   272 create = decorators.view(view.create)
   273 edit = decorators.view(view.edit)
   273 edit = decorators.view(view.edit)
   274 delete = decorators.view(view.delete)
   274 delete = decorators.view(view.delete)
   275 list = decorators.view(view.list)
   275 list = decorators.view(view.list)
   276 public = decorators.view(view.public)
   276 public = decorators.view(view.public)
       
   277 record = decorators.view(view.viewRecord)
   277 results = decorators.view(view.viewResults)
   278 results = decorators.view(view.viewResults)
   278 send_reminder = decorators.view(view.sendReminder)
   279 send_reminder = decorators.view(view.sendReminder)
   279 take = decorators.view(view.take)
   280 take = decorators.view(view.take)