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')
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')
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')
def test_setting_n(self): folder.update_settings(self.folder_object, 'n') self.assertTrue(folder.submission_has_folder_flag(self.submission, 'n')) # no-notifications
def test_setting_u(self): folder.update_settings(self.folder_object, 'u') self.assertTrue(folder.submission_has_folder_flag(self.submission, 'u')) # profile-filter
def test_setting_m(self): folder.update_settings(self.folder_object, 'm') self.assertTrue(folder.submission_has_folder_flag(self.submission, 'm')) # index-filter
def test_setting_f(self): folder.update_settings(self.folder_object, 'f') self.assertTrue(folder.submission_has_folder_flag(self.submission, 'f')) # featured-filter
def test_setting_n(self): folder.update_settings(self.folder_object, 'n') self.assertTrue(folder.submission_has_folder_flag( self.submission, 'n')) # no-notifications
def test_setting_u(self): folder.update_settings(self.folder_object, 'u') self.assertTrue(folder.submission_has_folder_flag( self.submission, 'u')) # profile-filter
def test_setting_m(self): folder.update_settings(self.folder_object, 'm') self.assertTrue(folder.submission_has_folder_flag( self.submission, 'm')) # index-filter
def test_setting_f(self): folder.update_settings(self.folder_object, 'f') self.assertTrue(folder.submission_has_folder_flag( self.submission, 'f')) # featured-filter