From 5bffa4893bf2add8d6045be6c509c0befee9c767 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 24 Jun 2016 15:41:14 -0400 Subject: [PATCH] Fixed bug where checkboxes were being shown on tables regardless of user permissions --- netbox/utilities/tables.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/netbox/utilities/tables.py b/netbox/utilities/tables.py index 8f494d609..724e96056 100644 --- a/netbox/utilities/tables.py +++ b/netbox/utilities/tables.py @@ -19,8 +19,11 @@ class BaseTable(tables.Table): class ToggleColumn(tables.CheckBoxColumn): - default = '' - visible = False + + def __init__(self, *args, **kwargs): + default = kwargs.pop('default', '') + visible = kwargs.pop('visible', False) + super(ToggleColumn, self).__init__(*args, default=default, visible=visible, **kwargs) @property def header(self):