2
0
Эх сурвалжийг харах

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

Jeremy Stretch 9 жил өмнө
parent
commit
5bffa4893b

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