Skip to content

Commit 29eb238

Browse files
Merge pull request #7115 from sdktr/7113-fix-prefix-iprange-bulkedit
Fixes #7113: iprange bulk options within Prefix view
2 parents d2fe59a + 9772c57 commit 29eb238

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

docs/release-notes/version-3.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* [#7106](https://github.com/netbox-community/netbox/issues/7106) - Fix incorrect "Map It" button URL on a site's Physical Address field
2525
* [#7107](https://github.com/netbox-community/netbox/issues/7107) - Fix missing search button and search results in IP Address assignment "Assign IP" tab
2626
* [#7109](https://github.com/netbox-community/netbox/issues/7109) - Ensure human readability of exceptions raised during REST API requests
27+
* [#7113](https://github.com/netbox-community/netbox/issues/7113) - Fix IPRange bulk options within Prefix view
2728

2829
---
2930

netbox/ipam/views.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,16 @@ def get_extra_context(self, request, instance):
427427

428428
bulk_querystring = 'vrf_id={}&parent={}'.format(instance.vrf.pk if instance.vrf else '0', instance.prefix)
429429

430+
# Compile permissions list for rendering the object table
431+
permissions = {
432+
'add': request.user.has_perm('ipam.add_iprange'),
433+
'change': request.user.has_perm('ipam.change_iprange'),
434+
'delete': request.user.has_perm('ipam.delete_iprange'),
435+
}
436+
430437
return {
431438
'table': table,
439+
'permissions': permissions,
432440
'bulk_querystring': bulk_querystring,
433441
'active_tab': 'ip-ranges',
434442
}

netbox/templates/ipam/prefix/ip_ranges.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="row">
77
<div class="col col-md-12">
88
{% include 'inc/table_controls.html' with table_modal="IPRangeTable_config" %}
9-
{% include 'utilities/obj_table.html' with heading='Child IP Ranges' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' parent=prefix %}
9+
{% include 'utilities/obj_table.html' with heading='Child IP Ranges' bulk_edit_url='ipam:iprange_bulk_edit' bulk_delete_url='ipam:iprange_bulk_delete' parent=prefix %}
1010
</div>
1111
</div>
1212
{% table_config_form table table_name="IPRangeTable" %}

0 commit comments

Comments
 (0)