Add "local only" column to Users grid
but only show if user has perm of course
This commit is contained in:
parent
917d5ab3fa
commit
af4be59fe0
|
@ -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):
|
||||||
|
|
|
@ -57,6 +57,7 @@ class UsersView(PrincipalMasterView):
|
||||||
'username',
|
'username',
|
||||||
'person',
|
'person',
|
||||||
'active',
|
'active',
|
||||||
|
'local_only',
|
||||||
]
|
]
|
||||||
|
|
||||||
form_fields = [
|
form_fields = [
|
||||||
|
|
Loading…
Reference in a new issue