Closed as not planned
Description
Deployment Type
Self-hosted
NetBox Version
v4.2.7
Python Version
3.10
Steps to Reproduce
- Create a user of type "Employee"
- Create a Tenant and name it what you want, copy the tenant_id out of the url.
- Give the user OR group only Tenant specific rights to e.g. create a Device
- to do this you go as admin to "Admin" -> "Permissions" create a new permission, allow actions "Can view", "Can add", "Can change" & "Can delete" and then assign permissions:
- DCIM > Device
- you assign the permission to the user.
- at the end you paste the following under "Restrictions" of the Permission and replace the tenant_id with the tenant you created bevore.
{"tenant__id": 22}
it can look like that:
- to make the user able to see Device-types and roles and stuff you create a second permission non-tenant specific, to do this start the creation process allow action "Can view" only and select the following permissions after assigning the permission to the User:
- DCIM > Devicerole
- DCIM > Devicetype
- DCIM > Location
- to do this you go as admin to "Admin" -> "Permissions" create a new permission, allow actions "Can view", "Can add", "Can change" & "Can delete" and then assign permissions:
- Try to create a Device using NO TENANT with the Test User.
- you will get error: Operation failed due to object-level permissions violation
- Login as Admin
- Search for the Device name or similar, you will find the device.
- Try to edit the Zombie, you will get an error but it will apply the change.```<class 'dcim.models.devices.Device.DoesNotExist'>evice matching query does not exist.
Python-Version: 3.11.2
NetBox-Version: 4.2.7
Plugins:
netbox_branching: 0.5.4
netbox_documents: 0.7.2
netbox_interface_synchronization: 4.1.6
netbox_inventory: 2.3.0
netbox_ipcalculator: 1.4.9
netbox_topology_views: 4.2.1
7. Try to delete the device, its impossible due to:
<class 'dcim.models.devices.Device.DoesNotExist'>
Device matching query does not exist.
Python-Version: 3.11.2
NetBox-Version: 4.2.7
Plugins:
netbox_branching: 0.5.4
netbox_documents: 0.7.2
netbox_interface_synchronization: 4.1.6
netbox_inventory: 2.3.0
netbox_ipcalculator: 1.4.9
netbox_topology_views: 4.2.1
### Expected Behavior
Device is not going to be created due to permissions.
### Observed Behavior
User got error `Operation failed due to object-level permissions violation` but a zombie/broken device got created.