diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index 59b603ab1..2e1f38d6b 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -24,6 +24,7 @@ * [#7106](https://github.com/netbox-community/netbox/issues/7106) - Fix incorrect "Map It" button URL on a site's Physical Address field * [#7107](https://github.com/netbox-community/netbox/issues/7107) - Fix missing search button and search results in IP Address assignment "Assign IP" tab * [#7109](https://github.com/netbox-community/netbox/issues/7109) - Ensure human readability of exceptions raised during REST API requests +* [#7113](https://github.com/netbox-community/netbox/issues/7113) - Fix IPRange bulk options within Prefix view --- diff --git a/netbox/ipam/views.py b/netbox/ipam/views.py index b33947f4e..7bb8bcc7d 100644 --- a/netbox/ipam/views.py +++ b/netbox/ipam/views.py @@ -427,8 +427,16 @@ class PrefixIPRangesView(generic.ObjectView): bulk_querystring = 'vrf_id={}&parent={}'.format(instance.vrf.pk if instance.vrf else '0', instance.prefix) + # Compile permissions list for rendering the object table + permissions = { + 'add': request.user.has_perm('ipam.add_iprange'), + 'change': request.user.has_perm('ipam.change_iprange'), + 'delete': request.user.has_perm('ipam.delete_iprange'), + } + return { 'table': table, + 'permissions': permissions, 'bulk_querystring': bulk_querystring, 'active_tab': 'ip-ranges', } diff --git a/netbox/templates/ipam/prefix/ip_ranges.html b/netbox/templates/ipam/prefix/ip_ranges.html index 13b41ff5a..e43014042 100644 --- a/netbox/templates/ipam/prefix/ip_ranges.html +++ b/netbox/templates/ipam/prefix/ip_ranges.html @@ -6,7 +6,7 @@