Example #1
0
def control_editfolder_post_(request):
    folderid = int(request.matchdict['folderid'])
    if not folder.check(request.userid, folderid):
        raise WeasylError('InsufficientPermissions')

    form = request.web_input(settings=[])
    folder.update_settings(folderid, form.settings)
    raise HTTPSeeOther(location='/manage/folders')
Example #2
0
def control_editfolder_post_(request):
        folderid = int(request.matchdict['folderid'])
        if not folder.check(request.userid, folderid):
            return Response(define.errorpage(request.userid, errorcode.permission))

        form = request.web_input(settings=[])
        folder.update_settings(folderid, form.settings)
        raise HTTPSeeOther(location='/manage/folders')
Example #3
0
    def POST(self, folderid):
        folderid = int(folderid)
        if not folder.check(self.user_id, folderid):
            return define.errorpage(self.user_id, errorcode.permission)

        form = web.input(settings=[])
        folder.update_settings(folderid, form.settings)
        raise web.seeother('/manage/folders')
Example #4
0
def control_editfolder_post_(request):
    folderid = int(request.matchdict['folderid'])
    if not folder.check(request.userid, folderid):
        return Response(define.errorpage(request.userid, errorcode.permission))

    form = request.web_input(settings=[])
    folder.update_settings(folderid, form.settings)
    raise HTTPSeeOther(location='/manage/folders')
Example #5
0
    def POST(self, folderid):
        folderid = int(folderid)
        if not folder.check(self.user_id, folderid):
            return define.errorpage(self.user_id, errorcode.permission)

        form = web.input(settings=[])
        folder.update_settings(folderid, form.settings)
        raise web.seeother('/manage/folders')
Example #6
0
 def test_setting_n(self):
     folder.update_settings(self.folder_object, 'n')
     self.assertTrue(folder.submission_has_folder_flag(self.submission, 'n'))  # no-notifications
Example #7
0
 def test_setting_u(self):
     folder.update_settings(self.folder_object, 'u')
     self.assertTrue(folder.submission_has_folder_flag(self.submission, 'u'))  # profile-filter
Example #8
0
 def test_setting_m(self):
     folder.update_settings(self.folder_object, 'm')
     self.assertTrue(folder.submission_has_folder_flag(self.submission, 'm'))  # index-filter
Example #9
0
 def test_setting_f(self):
     folder.update_settings(self.folder_object, 'f')
     self.assertTrue(folder.submission_has_folder_flag(self.submission, 'f'))  # featured-filter
Example #10
0
 def test_setting_n(self):
     folder.update_settings(self.folder_object, 'n')
     self.assertTrue(folder.submission_has_folder_flag(
         self.submission, 'n'))  # no-notifications
Example #11
0
 def test_setting_u(self):
     folder.update_settings(self.folder_object, 'u')
     self.assertTrue(folder.submission_has_folder_flag(
         self.submission, 'u'))  # profile-filter
Example #12
0
 def test_setting_m(self):
     folder.update_settings(self.folder_object, 'm')
     self.assertTrue(folder.submission_has_folder_flag(
         self.submission, 'm'))  # index-filter
Example #13
0
 def test_setting_f(self):
     folder.update_settings(self.folder_object, 'f')
     self.assertTrue(folder.submission_has_folder_flag(
         self.submission, 'f'))  # featured-filter