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

Ban a user asking from a list of reasons and with possible side effects. #3

Open
fernandez14 opened this issue Apr 19, 2019 · 2 comments

Comments

@fernandez14
Copy link
Contributor

Inside the users panel for admins there's an option to ban a user. Complete the implementation with tryanzu/anzu#7 specs.

It has to ask for a reason (simple select) and if "other" option is selected then ask details.
Special options could include the option to soft delete all user's posts or comments. (spam accounts)

@RodrigoCR
Copy link
Collaborator

I don't know if the option should soft delete all user's posts or comments, why don't we create a middleware to check if posts/comments are from a banned user, and then, hide them.

I mean, what if you want to un-ban a user? and what if this user has deleted some of this own posts or comments, how are you going to differentiate them from the deleted because of the ban?

(I know this is a task for backend tho).

I think the label in frontend should be Also hide all posts and comments from this user.

@fernandez14 fernandez14 self-assigned this Jun 10, 2019
@fernandez14
Copy link
Contributor Author

I don't know if the option should soft delete all user's posts or comments, why don't we create a middleware to check if posts/comments are from a banned user, and then, hide them.

I mean, what if you want to un-ban a user? and what if this user has deleted some of this own posts or comments, how are you going to differentiate them from the deleted because of the ban?

(I know this is a task for backend tho).

I think the label in frontend should be Also hide all posts and comments from this user.

I kinda like the idea of having a runtime soft delete, my only concern would be how to handle large lists of softdeleted items without messing with pagination. Lets say you ban someone because he spammed, and he now has 100 comments in the last 10 posts, if you do the check in runtime the pagination would be broken because of the large lists of comments/posts. Maybe we could do another soft delete but with a special field to differentiate? banned_at for contents could be the soft delete field.

Other than the side effects I think I'm half way this issue, I already got the reasons lists from config, ban reasons duration, ban check middleware, you can check it out and help me out finish it here: tryanzu/anzu#16

@fernandez14 fernandez14 moved this from In progress to Done in Frontend alpha release Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants