Bulk delete from IP Address List - Possible Permissions Issue #665

Closed
opened 2025-12-29 16:24:34 +01:00 by adam · 1 comment
Owner

Originally created by @specialcircumstances on GitHub (Jan 25, 2017).

Assuming a normal user (not staff or superuser) has add, delete, change permissions for devices and ip addresses.

When the user selects multiple IP Addresses in the IP Address list, the bulk Delete button does not appear.

A superuser can do this fine. I don't think this is intended?

I think this happens in obj_table.html somwhere around here:

{% if bulk_delete_url and table.model|user_can_delete:request.user %}

So, assuming the bulk_delete_url is passed correctly from the view, I'm guessing it's something to do with the evaluation of table.model|user_can_delete:request.user but that's as far as I've been able to get.

Hope that's some help?

Originally created by @specialcircumstances on GitHub (Jan 25, 2017). Assuming a normal user (not staff or superuser) has add, delete, change permissions for devices and ip addresses. When the user selects multiple IP Addresses in the IP Address list, the bulk Delete button does not appear. A superuser can do this fine. I don't think this is intended? I think this happens in obj_table.html somwhere around here: `{% if bulk_delete_url and table.model|user_can_delete:request.user %}` So, assuming the bulk_delete_url is passed correctly from the view, I'm guessing it's something to do with the evaluation of table.model|user_can_delete:request.user but that's as far as I've been able to get. Hope that's some help?
adam added the type: bug label 2025-12-29 16:24:34 +01:00
adam closed this issue 2025-12-29 16:24:34 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 26, 2017):

It seems like table.model is no longer returning the associate model. Not sure why; could have been a change in django-tables2. At any rate, I'm going to rewrite they way permissions are checked for table rendering.

@jeremystretch commented on GitHub (Jan 26, 2017): It seems like `table.model` is no longer returning the associate model. Not sure why; could have been a change in django-tables2. At any rate, I'm going to rewrite they way permissions are checked for table rendering.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#665