Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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