Add recaptcha field to contact us form when logged out

Bug #1726560 reported by Robert Lyon on 2017-10-23
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Wishlist
Unassigned

Bug Description

To make the form a little bit more human only

Environment to be tested: Master
Browser to be tested: Any browser

Precondition:

1. A user with 'Site admin' access exists.
2. 'reCAPTCHA site key' & 'reCAPTCHA secret key' are generated.
 You create the 'reCAPTCHA site key' & 'reCAPTCHA secret key' at https://www.google.com/recaptcha/admin
3. Normal user ‘User one’ exists.

Steps to reproduce:

1. Log in as 'Site admin'.
2. Navigate to Administration menu > Configure site > Site options > Security settings.
3. Switch 'reCAPTCHA on user registration/contact us forms' to 'Yes'.
4. Enter the 'reCAPTCHA site key' & 'reCAPTCHA secret key'.
5. Click the 'Update site options' button.
6. Log out as 'Site admin'.

7. Click the hyperlink 'Contact us', which is at the bottom of the page.

Expected result: A captcha field is displayed on the form.

8. Enter an email into the 'Email' field.
9. Enter the name 'Tester' into the 'Name' field.
10. Enter the text as 'This is a test message' into the 'Message' field.
11. Select the checkbox 'I'm not a robot'.
12. Click the 'Send message' button.

Expected result: The Mahara homepage is displayed with a message 'Your message has been sent'.

13. Log in as 'User one'.
14. Click the hyperlink 'Contact us', which is at the bottom of the page.

Expected result: The captcha field is not displayed on the form and the 'Email'and 'Name' fields are auto populated.

15. Enter the text as 'This is a test message' into the 'Message' field.
16. Click the 'Send message' button.

Expected result: The Mahara dashboard page is displayed with a message 'Your message has been sent'.

Reviewed: https://reviews.mahara.org/8168
Committed: https://git.mahara.org/mahara/mahara/commit/06cd9f5139b3e37617b8a9db1f7c7454beab5aab
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit 06cd9f5139b3e37617b8a9db1f7c7454beab5aab
Author: Robert Lyon <email address hidden>
Date: Tue Oct 24 09:10:16 2017 +1300

Bug 1726560: Add captcha field to contact us form

When the user is logged out

behatnotneeded

Change-Id: Icc8711671f0f73699da79aca4b53548210fb6875
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
summary: - Add captcha field to contact us form when logged out
+ Add recaptcha field to contact us form when logged out
Robert Lyon (robertl-9) on 2018-04-05
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers