Creating a rack checks for wrong permissions #3257

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

Originally created by @jeremystretch on GitHub (Jan 31, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6.8
  • NetBox version: 2.7.3

Steps to Reproduce

  1. Assign a user permission to create a rack (dcim.add_rack).
  2. Log in as that user and attempt to create a rack at /dcim/racks/add/

Expected Behavior

The rack creation form should be displayed.

Observed Behavior

A 403 error (permission denied) is raised. This occurs because the URL configuration is actually pointing to RackEditView instead of RackCreateView, so Django is looking for the dcim.change_rack permission instead. (This permissions check is the only different between the two views.)

Originally created by @jeremystretch on GitHub (Jan 31, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 3.6.8 * NetBox version: 2.7.3 ### Steps to Reproduce 1. Assign a user permission to create a rack (`dcim.add_rack`). 2. Log in as that user and attempt to create a rack at `/dcim/racks/add/` ### Expected Behavior The rack creation form should be displayed. ### Observed Behavior A 403 error (permission denied) is raised. This occurs because the URL configuration is actually pointing to RackEditView instead of RackCreateView, so Django is looking for the `dcim.change_rack` permission instead. (This permissions check is the only different between the two views.)
adam added the type: bugstatus: accepted labels 2025-12-29 18:27:10 +01:00
adam closed this issue 2025-12-29 18:27: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#3257