403 Forbidden error page should be styled similar to 404 #3939

Closed
opened 2025-12-29 18:32:10 +01:00 by adam · 0 comments
Owner

Originally created by @cpmills1975 on GitHub (Aug 4, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6.8
  • NetBox version: 2.9-beta1

Steps to Reproduce

  1. Attempt to access any object for which permission is not granted

Expected Behavior

A NetBox specific web page expressing the lack of permission is displayed similar to the 404 not found page which displays the NetBox menu bar and a button permitting navigation somewhere else. Alternatively, redirection to the login page might be more appropriate.

Observed Behavior

When attempting to access an object for which no permission is granted, a mix of 404's and 403's are returned. I'm not clear under which circumstances each is generated but, for example, creating a connection between two devices when no permission exists at all on dcim > cables results in a 403 Forbidden error. The styling presumably reflects the web server default. However, when clicking on the name of the device at the 'B' end of that connection where some permissions exist but for which a constraint is in place, a more stylised 404 error is displayed along with the NetBox menu bar and a button to return to the home page.

Originally created by @cpmills1975 on GitHub (Aug 4, 2020). Originally assigned to: @jeremystretch on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.6.8 * NetBox version: 2.9-beta1 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Attempt to access any object for which permission is not granted 2. 3. <!-- What did you expect to happen? --> ### Expected Behavior A NetBox specific web page expressing the lack of permission is displayed similar to the 404 not found page which displays the NetBox menu bar and a button permitting navigation somewhere else. Alternatively, redirection to the login page might be more appropriate. <!-- What happened instead? --> ### Observed Behavior When attempting to access an object for which no permission is granted, a mix of 404's and 403's are returned. I'm not clear under which circumstances each is generated but, for example, creating a connection between two devices when no permission exists at all on dcim > cables results in a 403 Forbidden error. The styling presumably reflects the web server default. However, when clicking on the name of the device at the 'B' end of that connection where some permissions exist but for which a constraint is in place, a more stylised 404 error is displayed along with the NetBox menu bar and a button to return to the home page.
adam added the status: acceptedtype: featurebeta labels 2025-12-29 18:32:10 +01:00
adam closed this issue 2025-12-29 18:32:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3939