[PR #7828] [MERGED] Fix #7729: Fix context of VLAN table in VLAN Group view #13289

Closed
opened 2025-12-29 22:26:34 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/7828
Author: @rhyser9
Created: 11/14/2021
Status: Merged
Merged: 11/15/2021
Merged by: @jeremystretch

Base: developHead: 7229_bug_add_vlans_link


📝 Commits (1)

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 netbox/templates/ipam/vlangroup.html (+2 -1)

📄 Description

Fixes: #7729

Using the render_table tag attaches the calling template's context to the table object, thus allowing the vid TemplateColumn to properly evaluate the perms.ipam.add_vlan check.

98cc36c458/netbox/ipam/tables/vlans.py (L25-L33)

See the note at https://django-tables2.readthedocs.io/en/latest/pages/template-tags.html#render-table


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/7828 **Author:** [@rhyser9](https://github.com/rhyser9) **Created:** 11/14/2021 **Status:** ✅ Merged **Merged:** 11/15/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `7229_bug_add_vlans_link` --- ### 📝 Commits (1) - [`a5a4801`](https://github.com/netbox-community/netbox/commit/a5a480133ff0c2c9764f2b72d10d0c50434fac08) netbox-community/netbox#7229: Fix context of VLAN table in VLAN Group view ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/templates/ipam/vlangroup.html` (+2 -1) </details> ### 📄 Description ### Fixes: #7729 Using the `render_table` tag attaches the calling template's context to the table object, thus allowing the `vid` `TemplateColumn` to properly evaluate the `perms.ipam.add_vlan` check. https://github.com/netbox-community/netbox/blob/98cc36c458e1dd6fbcf140dc271846ececb6e6f1/netbox/ipam/tables/vlans.py#L25-L33 See the note at https://django-tables2.readthedocs.io/en/latest/pages/template-tags.html#render-table --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:26:34 +01:00
adam closed this issue 2025-12-29 22:26:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13289