Replace dropdowns with autocomplete, for "find principals by perm"
This commit is contained in:
parent
f86cc83996
commit
659f5a8fe1
3 changed files with 173 additions and 47 deletions
|
@ -77,7 +77,20 @@ class PrincipalMasterView(MasterView):
|
|||
perms = self.get_buefy_perms_data(sorted_perms)
|
||||
context['buefy_perms'] = perms
|
||||
context['buefy_sorted_groups'] = list(perms)
|
||||
context['selected_group'] = permission_group or 'common'
|
||||
|
||||
if permission_group and permission_group not in perms:
|
||||
permission_group = None
|
||||
if permission:
|
||||
if permission_group:
|
||||
group = dict([(p['permkey'], p) for p in perms[permission_group]['permissions']])
|
||||
if permission in group:
|
||||
context['selected_permission_label'] = group[permission]['label']
|
||||
else:
|
||||
permission = None
|
||||
else:
|
||||
permission = None
|
||||
|
||||
context['selected_group'] = permission_group
|
||||
context['selected_permission'] = permission
|
||||
|
||||
return self.render_to_response('find_by_perm', context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue