When a user is banned, hide their profile for the duration of the ban

RESOLVED FIXED

Status

Mozilla Developer Network
User management
RESOLVED FIXED
5 years ago
7 months ago

People

(Reporter: groovecoder, Unassigned)

Tracking

(Blocks: 1 bug)

Details

(Whiteboard: [mentor=groovecoder][easypickings])

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:18.0) Gecko/18.0 Firefox/18.0
Build ID: 20121112042014

Steps to reproduce:

Made a user inactive in django admin panel


Actual results:

https://developer.mozilla.org/en-US/profiles/nekretnine is still visible


Expected results:

https://developer.mozilla.org/en-US/profiles/nekretnine should be 404 or 403
Maybe we could wrap this up into our other user banning features. Do you see us using the /admin banning workflow much after we have those in place?
Flags: needinfo?(lcrouch)
(Reporter)

Comment 2

5 years ago
No but I think banning a user thru the web UI will do the same thing. Set their is_active=False.
Flags: needinfo?(lcrouch) needinfo?(lcrouch) → needinfo+
Sounds good.

Let's also remember to re-instate the profile when a ban is lifted.
Summary: making user inactive should block their profile → When a user is banned, hide their profile for the duration of the ban
Blocks: 681925
(Reporter)

Updated

4 years ago
Whiteboard: [mentor=groovecoder][easypickings]
I would like to look into this.
(Reporter)

Comment 5

4 years ago
Cool! Thanks! Let me know if you need some more info than what's here in the bug.
Should we simply hide the user information?  Sending "Forbidden" seems like it could hurt SEO?
Flags: needinfo?(jypenator)
(Reporter)

Comment 7

4 years ago
Will super-users need and want to see banned users' profiles? If so, maybe we send a 403 `if request.user.is_superuser == False`?
SEO will not be impacted with it (only the specific page, but that's ok).

I like Luke's idea about 403, except for superusers. Seeing a banned user profile is something an admin want to do once in a while (to check contributions or comment put by him/her).

Ideally the 403 page would have an info why it is restricted ("banned users"). But that's a nit.
Flags: needinfo?(jypenator)
I have opened a pull request regarding this issue.
https://github.com/mozilla/kuma/pull/2083

Comment 10

4 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/131c6b868232bb20bcb4bd0b411c89ff959242c3
Fix Bug 811751 - Hide banned user profile.

https://github.com/mozilla/kuma/commit/35176583647c00764a86f30357d020de2978cd3c
Merge pull request #2083 from mediocrity/hide_banned_profile

Fix Bug 811751 - Hide banned user profile.

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 11

4 years ago
Commits pushed to search-filter-api at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/131c6b868232bb20bcb4bd0b411c89ff959242c3
Fix Bug 811751 - Hide banned user profile.

https://github.com/mozilla/kuma/commit/35176583647c00764a86f30357d020de2978cd3c
Merge pull request #2083 from mediocrity/hide_banned_profile
See Also: → bug 1353134
See Also: → bug 1353138
You need to log in before you can comment on or make changes to this bug.