forms: remove captcha on workflow action forms (#13110)

This commit is contained in:
Frédéric Péters 2016-09-08 21:24:59 +02:00
parent a7b7627e00
commit 1444ed1acb
2 changed files with 0 additions and 7 deletions

View File

@ -893,9 +893,6 @@ def test_form_tracking_code(pub):
resp = resp.follow()
assert 'form_comment' in resp.body # makes sure user is treated as submitter
resp.forms[0]['comment'] = 'hello world'
session_id = app.cookies.values()[0].strip('"')
session = BasicSession.get(session_id)
resp.forms[0]['captcha$q'] = session.get_captcha_token(resp.forms[0]['captcha$token'].value)['answer']
resp = resp.forms[0].submit()
assert formdef.data_class().get(formdata_id).evolution[-1].comment == 'hello world'

View File

@ -232,13 +232,9 @@ class FormStatusPage(Directory):
r += self.receipt()
r += self.history()
form = None
session = get_session()
user = get_request().user
form = self.filled.get_workflow_form(user)
if form:
form.add_captcha()
if form and form.is_submitted():
if not form.has_errors():