Browse Source

Fixed bug where checkboxes were being shown on tables regardless of user permissions

Jeremy Stretch 8 years ago
parent
commit
5bffa4893b
1 changed files with 5 additions and 2 deletions
  1. 5 2
      netbox/utilities/tables.py

+ 5 - 2
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):