Error shown when adding device type without platform permission #9293

Closed
opened 2025-12-29 20:47:56 +01:00 by adam · 6 comments
Owner

Originally created by @llamafilm on GitHub (Feb 26, 2024).

Deployment Type

Self-hosted

NetBox Version

v3.7.0

Python Version

3.10

Steps to Reproduce

  1. Create a user with permissions limited to dcim.device_type and dcim.manufacturer.
  2. Login as that user and create a new device type
  3. Select any existing Manufacturer in the dropdown list

Expected Behavior

I should be able to create a Device Type without error

Observed Behavior

The UI shows this error:
Screenshot 2024-02-25 at 7 36 54 PM

Originally created by @llamafilm on GitHub (Feb 26, 2024). ### Deployment Type Self-hosted ### NetBox Version v3.7.0 ### Python Version 3.10 ### Steps to Reproduce 1. Create a user with permissions limited to `dcim.device_type` and `dcim.manufacturer`. 2. Login as that user and create a new device type 3. Select any existing Manufacturer in the dropdown list ### Expected Behavior I should be able to create a Device Type without error ### Observed Behavior The UI shows this error: <img width="1231" alt="Screenshot 2024-02-25 at 7 36 54 PM" src="https://github.com/netbox-community/netbox/assets/3991046/eee1950b-bfa9-4828-b273-f5479bb5961f">
adam closed this issue 2025-12-29 20:47:56 +01:00
Author
Owner

@llamafilm commented on GitHub (Feb 26, 2024):

Obviously I could work around this by adding dcim.platform permission to this user group. But that would cause Platforms to appear in the sidebar. I'm trying to reduce clutter in the sidebar for items we don't use.

@llamafilm commented on GitHub (Feb 26, 2024): Obviously I could work around this by adding `dcim.platform` permission to this user group. But that would cause Platforms to appear in the sidebar. I'm trying to reduce clutter in the sidebar for items we don't use.
Author
Owner

@llamafilm commented on GitHub (Feb 26, 2024):

A similar issue happens when creating a new device without having permission for dcim.rack

@llamafilm commented on GitHub (Feb 26, 2024): A similar issue happens when creating a new device without having permission for `dcim.rack`
Author
Owner

@abhi1693 commented on GitHub (Feb 26, 2024):

This is expected. And, you should still be able to create a device type. The default platform field is optional and the error indicates that it was unable to fetch the list rather than unable to create device type.

@abhi1693 commented on GitHub (Feb 26, 2024): This is expected. And, you should still be able to create a device type. The default platform field is optional and the error indicates that it was unable to fetch the list rather than unable to create device type.
Author
Owner

@llamafilm commented on GitHub (Feb 26, 2024):

Yes I know it's optional, but this makes for a bad user experience. I already got one user asking for help because they didn't realize they could just ignore the error.

I'm trying to use permissions to hide unused fields, to indicate to each user which fields they are supposed to work with. I would prefer that any unpermitted fields should be hidden completely. I'm open to other ideas too, but showing a big red error message is unacceptable.

@llamafilm commented on GitHub (Feb 26, 2024): Yes I know it's optional, but this makes for a bad user experience. I already got one user asking for help because they didn't realize they could just ignore the error. I'm trying to use permissions to hide unused fields, to indicate to each user which fields they are supposed to work with. I would prefer that any unpermitted fields should be hidden completely. I'm open to other ideas too, but showing a big red error message is unacceptable.
Author
Owner

@abhi1693 commented on GitHub (Feb 26, 2024):

You should raise this as a FR if you want new functionality. Note that no new UI work will be implemented for v3 but you can add this for future work like v4.1

@abhi1693 commented on GitHub (Feb 26, 2024): You should raise this as a FR if you want new functionality. Note that no new UI work will be implemented for v3 but you can add this for future work like v4.1
Author
Owner

@jeremystretch commented on GitHub (Feb 26, 2024):

The platform model is a core component of modeling devices in NetBox, and it's expected that users with a need to do so will have permission to at least view the available platforms. If you want to deviate from that behavior, you'll need to fork NetBox with custom changes suitable for your specific use case.

@jeremystretch commented on GitHub (Feb 26, 2024): The platform model is a core component of modeling devices in NetBox, and it's expected that users with a need to do so will have permission to at least view the available platforms. If you want to deviate from that behavior, you'll need to fork NetBox with custom changes suitable for your specific use case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9293