Add "local only" column to Users grid

but only show if user has perm of course
This commit is contained in:
Lance Edgar 2020-03-23 20:24:03 -05:00
parent 917d5ab3fa
commit af4be59fe0
2 changed files with 2 additions and 0 deletions

View file

@ -411,6 +411,7 @@ class MasterView(View):
# hide "local only" grid filter, unless global access allowed # hide "local only" grid filter, unless global access allowed
if self.secure_global_objects: if self.secure_global_objects:
if not self.has_perm('view_global'): if not self.has_perm('view_global'):
grid.hide_column('local_only')
grid.remove_filter('local_only') grid.remove_filter('local_only')
def grid_extra_class(self, obj, i): def grid_extra_class(self, obj, i):

View file

@ -57,6 +57,7 @@ class UsersView(PrincipalMasterView):
'username', 'username',
'person', 'person',
'active', 'active',
'local_only',
] ]
form_fields = [ form_fields = [