diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 94c7a984f..1ec3e0fdf 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -6,6 +6,10 @@ * [#6197](https://github.com/netbox-community/netbox/issues/6197) - Introduced `SESSION_COOKIE_NAME` config parameter +### Bug Fixes + +* [#6308](https://github.com/netbox-community/netbox/issues/6308) - Fix linking of available VLANs in VLAN group view + --- ## v2.11.2 (2021-04-27) diff --git a/netbox/ipam/views.py b/netbox/ipam/views.py index 0339aff07..f7da1f583 100644 --- a/netbox/ipam/views.py +++ b/netbox/ipam/views.py @@ -684,9 +684,17 @@ class VLANGroupView(generic.ObjectView): vlans_table.columns.hide('group') paginate_table(vlans_table, request) + # Compile permissions list for rendering the object table + permissions = { + 'add': request.user.has_perm('ipam.add_vlan'), + 'change': request.user.has_perm('ipam.change_vlan'), + 'delete': request.user.has_perm('ipam.delete_vlan'), + } + return { 'vlans_count': vlans_count, 'vlans_table': vlans_table, + 'permissions': permissions, } diff --git a/netbox/templates/ipam/vlangroup.html b/netbox/templates/ipam/vlangroup.html index 3118c1796..67330ef80 100644 --- a/netbox/templates/ipam/vlangroup.html +++ b/netbox/templates/ipam/vlangroup.html @@ -10,6 +10,15 @@