Closed Bug 635129 Opened 14 years ago Closed 14 years ago

Django app has no page for 403 Forbidden errors

Categories

(developer.mozilla.org Graveyard :: Demo Studio / Dev Derby, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: lorchard, Unassigned)

Details

Attachments

(2 files)

Some actions result in a 403 Forbidden error, such as attempting to delete a demo not owned by the user or by a non-admin user. But, there's no styled page for this error and Django doesn't seem to support this without adding middleware like this: https://github.com/wtanaka/django403
Target Milestone: --- → 0.9.4
I would like to try to get something up for 0.9.4. Now that we will have more users playing with UGC, we should handle cases like this with as much useful info as possible. I can help work on the copy and hopefully adding a page for 403 isn't too difficult to do.
I threw a page together for now. Log out of developer-stage9 and then go to https://developer-stage9.mozilla.org/en-US/demos/detail/flight-of-the-navigator/delete to see it. Jay, let's work out the copy we want.
Assignee: nobody → jay
Status: NEW → ASSIGNED
Whiteboard: qa-wanted
Adding Sheppy and Janet for some copy help. I can't seem to come up with anything better than what Luke already put on that page. I've never written custom 403 or 404 pages... is it acceptable to create a mini sitemap and have a big promo to become a member at the top? At the very least, we should at least present the following to the user: 1. Are you logged in as the right user? (already there) 2. If not, please sign up for the Mozilla Developer Network! (and add some cool things you can do as a member: contribute to docs, submit demos, talk about technology, etc) 3. There are a lot you can do without an account too! (link to doc center and demo studio so they can at least explore content that doesn't require login) Does that make sense to have on a 403 page?
I was about to say that sounds like too much for a humble 403 page, but I personally think a company's personality can show really well in the way it writes its error pages. It'd be cool to write a playful/teasing tone on the 403 page. "Silly developer, that's not YOUR demo!" ;)
Instead of "permission denied", how about a nod to HAL 9000: I'm sorry. I'm afraid I can't let you do that. ("I'm sorry, Dave" would be more authentic but also more confusing. I'm not sure this is a good place to go all salesy, but a little tongue-in-cheek would be OK.) Are you sure you're [logged in] as the right user? You do [have an account], don't you? You need one in order to edit docs, submit demos, and post to forums. If not, you can still [view demos] and [browse documentation]. I'm completely operational and all my circuits are functioning perfectly. However, if you think this is an error, please [file a bug]. Thank you.
brilliant! I'll see if I can throw the current username into the line.
Attached image GLaDOS 403
I like this GLaDOS version more. :)
Attachment #523625 - Flags: review?(jay)
Attached image HAL 403
Attachment #523626 - Flags: review?(jay)
Let's go with the HAL 403. It doesn't sound as scary and will probably make more sense to the majority of visitors. No idea how the l10n community will react, but hopefully 2001 is something most of the world is familiar with.
Comment on attachment 523626 [details] HAL 403 It'll be cool if we can find a way to insert the username based on cookie info... but even if not, I think this will work well. Thanks Janet for the idea and Luke for the quick patch.
Attachment #523626 - Flags: review?(jay) → review+
Comment on attachment 523625 [details] GLaDOS 403 I'm not familiar with GLaDOS, so the language and personality for this version doesn't seem as cool as the HAL version. But that's just me...
Attachment #523625 - Flags: review?(jay) → review-
(In reply to comment #10) > qa-verified-stage > https://developer-stage9.mozilla.org/en-US/demos/detail/flight-of-the-navigator/404 What are you verifying? There's still a pending patch, and the bug is "Assigned".
Raymond: Thanks for verifying that the 403 is in place and working, but please wait until we have the new copy checked in before signing off. Luke will mark this resolved fixed when it's ready for QA.
(In reply to comment #14) > Raymond: Thanks for verifying that the 403 is in place and working, but please > wait until we have the new copy checked in before signing off. > > Luke will mark this resolved fixed when it's ready for QA. The bug was marked qa-wanted so I verified on trunk. Please mark bugs as qa-wanted only after it is done.
Sorry, I had qa-wanted on there before we started adjusting the copy. HAL copy added to mdn and kuma repositories. Jay: if the user is logged-in it does say "I'm sorry {{username}}, ..." ;)
Assignee: jay → mozbugs.retornam
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: qa-wanted
(In reply to comment #16) > Sorry, I had qa-wanted on there before we started adjusting the copy. HAL copy > added to mdn and kuma repositories. Jay: if the user is logged-in it does say > "I'm sorry {{username}}, ..." ;) https://developer-stage9.mozilla.org/en-US/demos/detail/flight-of-the-navigator/404 When user is logged in it says I'm sorry, I could not find what you were looking for. Please start over on the home page. If you were following a broken link, please file a bug. Thanks!
Assignee: mozbugs.retornam → nobody
Whiteboard: qa-wanted
(In reply to comment #17) > assigned_to: mozbugs.retornam@gmail.com => nobody@mozilla.org; whiteboard: qa-wanted => (In reply to comment #16) > > Sorry, I had qa-wanted on there before we started adjusting the copy. HAL copy > > added to mdn and kuma repositories. Jay: if the user is logged-in it does say > > "I'm sorry {{username}}, ..." ;) > > https://developer-stage9.mozilla.org/en-US/demos/detail/flight-of-the-navigator/404 FWIW, that's a 404 Not Found, not a 403 Forbidden. This should give a 403 (unless you're mcoates): https://developer-stage.mozilla.org/en-US/demos/detail/this-is-a-test/delete
(In reply to comment #18) > (In reply to comment #17) > > assigned_to: mozbugs.retornam@gmail.com => nobody@mozilla.org; whiteboard: qa-wanted => (In reply to comment #16) > > > Sorry, I had qa-wanted on there before we started adjusting the copy. HAL copy > > > added to mdn and kuma repositories. Jay: if the user is logged-in it does say > > > "I'm sorry {{username}}, ..." ;) > > > > https://developer-stage9.mozilla.org/en-US/demos/detail/flight-of-the-navigator/404 > > FWIW, that's a 404 Not Found, not a 403 Forbidden. > > This should give a 403 (unless you're mcoates): > https://developer-stage.mozilla.org/en-US/demos/detail/this-is-a-test/delete Thanks for the correction, https://developer-stage.mozilla.org/en-US/demos/detail/this-is-a-test/delete
Version: MDN → unspecified
Component: Demos → Demo Studio / Dev Derby
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: