Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Abandoned]#162163282 Users can report Articles that violate terms #28

Closed
wants to merge 1 commit into from

Conversation

kafuuma
Copy link
Contributor

@kafuuma kafuuma commented Dec 19, 2018

What does this PR do?

This PR delivers a feature for users to report articles that violate terms

Description of the tasks to be completed?

  • A logged in user can report articles
  • An article cannot be reported more than once
  • Only Admin/super users can view a list of reported articles
  • When an article is reported, it is immediately removed from published articles

End points workin

- POST "/api/articles/<str:slug>/report/"
- GET "/api/reported/"

How should this be manually tested?

- Clone repository
- create a virtual environment
- Install requirements `pip install -r requirements.txt`
- Run the project `python manage.py runserver`
Paste URL in postman: `http://localhost:8000/api/articles/<str:slug>/report/`
Report body
{
	"report":{
		"reason":"this article has been plagiarised"
	}
}

Screenshots

  1. Report an article

rep1

  1. List reported articles

report

What are the relevant pivotal tracker stories

#162163282


if errors is not None:

return super(ArticleListReportJSONRenderer, self).render(data)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

henry, you missed testing this renderer class

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get but I tested almost every functionality
But that line remained, however, my coverage passes

@Kasulejoseph Kasulejoseph deleted the ft-article-reports-162163268 branch December 19, 2018 08:20
@Kasulejoseph Kasulejoseph restored the ft-article-reports-162163268 branch December 19, 2018 08:21
@Kasulejoseph Kasulejoseph reopened this Dec 19, 2018
Copy link
Contributor

@collin5 collin5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think reporting should not automatically remove an article, It should be the admin to remove the article after verifying that this is not a false positive.
Admin should also be able to dismiss false positive reports

Users can report articles that violate the terms
of use.
An article can oly be reported a maximum of five times
Admins/superusers can restore reported articles
When an article is reportes five times, it is
removed from published articles
Only admin can view a list of reported articles
and also delete or revert them

[Delivers #162163282]
@kafuuma kafuuma force-pushed the ft-article-reports-162163268 branch 4 times, most recently from 3cde6cf to 9e0ffdd Compare December 20, 2018 12:33
@kafuuma kafuuma changed the title ##162163282 Users can report Articles that violate terms [Abandoned]#162163282 Users can report Articles that violate terms Dec 20, 2018
@kafuuma kafuuma closed this Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants