示例#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')
示例#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')
示例#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')
示例#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')
示例#5
0
文件: settings.py 项目: 0x15/weasyl
    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')
示例#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
示例#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
示例#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
示例#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
示例#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
示例#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
示例#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
示例#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