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

Block user feature #175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Girik1105
Copy link

@Girik1105 Girik1105 commented Jun 10, 2021

Describe your changes :

In users/views.py -> Added Block User view, altered user_mumbles and user_article views so they don't show if an user is blocked. Altered following view so that they can't follow someone if they are blocked

in users/urls.py -> Added endpoint /api/users/{username}/block/

in users/models.py -> Added blocked_users ManyToMany Field in userprofile model.

In feed/views.py -> Changed Mumbles view so that it does not show the mumbles of users that have blocked or have been blocked.


#171

This feature allows users to block other users if they don't want to see a person's mumbles, articles, profiles. It also allows users to block someone if they don't want a user to see their mumbles, articles or profile.

User A blocks User B

User B cannot find user A's profile, mumbles or articles. His feed will stop showing User A's mumbles. User B will not be able to follow user A

User A will be able to find User A's profile, but only to unblock, User A will not be able to see User B's mumbles, articles or profile until he unblocks

Type of change :

  • New Feature

Preview (Screenshots) :

I have 2 users my account and Test

I can see test's mumbles

This is mumbles list

I block test from my account

I will have to unblock to see their mumbles/articles again

This is mumbles list but I cannot see Test2 mumbles as he has been blocked

From Test user's account I cannot view my mumbles, articles as test has been blocked from my account

From Test user's account I cannot find my profile as test has been blocked from my account

Checklist:

  • I have read the Code Of Conduct document.
  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my own.
  • I have tagged my reviewers below.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • All new and existing tests passed.

Reviewers

@PraveenMalethia @MidouWebDev

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.

1 participant