Do not link the homepage_content of probationary users. Do not let search
engine index probationary user' pages.
== Rules ==
* All users with karma == 0 are probationary.
* Set the robots directive to noindex,nofollow
* Do not linkify the homepage_content.
* Set the HTTP status code to 410 on profile pages for suspended accounts.
== QA ==
* Locate a suspended user (search answers)
* Verify the request response headers are set the status code to 410.
* Locate an account with zero karma.
* Verify that the profile page meta robots tag is index,nofollow.
* Locate an account with zero karma and a description (probably a spammer)
* Verify the homepage text is not formated as HTML.
* lib/lp/registry/browser/tests/person-views.txt
* Added tests to verify is_probationary_or_invalid_user and homepage_content properties on the PersonView.
* Add a test to verify that the HTTP status code is set to 410
for suspended accounts.
== Implementation ==
* lib/lp/registry/browser/person.py
* Added is_probationary_or_invalid_user and homepage_content properties
to control how to display the profile page for probationary users.
* Redefined the render() method to set the status code to 410 when the
account is suspended.
* lib/lp/registry/templates/person-index.pt
* Updated the template to use the view instead of the context object
to show content and set the meta data.
* lib/lp/testing/views.py
* Discovered that path_info was not used. I updated the helper to
use it.
This is my branch to discourage spammers.
lp:~sinzui/launchpad/spam-eggs-bug-495250 /bugs.launchpad .net/bugs/ 495250 implementation: flacoste, gary
Diff size: 282
Launchpad bug: https:/
Test command: ./bin/test -vvt "person-views"
Pre-
Target release: 3.1.12
= Discourage spammers =
Do not link the homepage_content of probationary users. Do not let search
engine index probationary user' pages.
== Rules ==
* All users with karma == 0 are probationary.
* Set the robots directive to noindex,nofollow
* Do not linkify the homepage_content.
* Set the HTTP status code to 410 on profile pages for suspended accounts.
== QA ==
* Locate a suspended user (search answers)
* Verify the request response headers are set the status code to 410.
* Locate an account with zero karma.
* Verify that the profile page meta robots tag is index,nofollow.
* Locate an account with zero karma and a description (probably a spammer)
* Verify the homepage text is not formated as HTML.
== Lint ==
Linting changed files: registry/ browser/ person. py registry/ browser/ tests/person- views.txt registry/ templates/ person- index.pt
lib/lp/
lib/lp/
lib/lp/
== Test ==
* lib/lp/ registry/ browser/ tests/person- views.txt _or_invalid_ user and
homepage_ content properties on the PersonView.
* Added tests to verify is_probationary
* Add a test to verify that the HTTP status code is set to 410
for suspended accounts.
== Implementation ==
* lib/lp/ registry/ browser/ person. py _or_invalid_ user and homepage_content properties registry/ templates/ person- index.pt testing/ views.py
* Added is_probationary
to control how to display the profile page for probationary users.
* Redefined the render() method to set the status code to 410 when the
account is suspended.
* lib/lp/
* Updated the template to use the view instead of the context object
to show content and set the meta data.
* lib/lp/
* Discovered that path_info was not used. I updated the helper to
use it.