Show More
@@ -54,6 +54,7 b' class HomeView(BaseAppView):' | |||
|
54 | 54 | active = str2bool(self.request.GET.get('active') or True) |
|
55 | 55 | include_groups = str2bool(self.request.GET.get('user_groups')) |
|
56 | 56 | expand_groups = str2bool(self.request.GET.get('user_groups_expand')) |
|
57 | skip_default_user = str2bool(self.request.GET.get('skip_default_user')) | |
|
57 | 58 | |
|
58 | 59 | log.debug('generating user list, query:%s, active:%s, with_groups:%s', |
|
59 | 60 | query, active, include_groups) |
@@ -61,6 +62,12 b' class HomeView(BaseAppView):' | |||
|
61 | 62 | _users = UserModel().get_users( |
|
62 | 63 | name_contains=query, only_active=active) |
|
63 | 64 | |
|
65 | def maybe_skip_default_user(usr): | |
|
66 | if skip_default_user and usr['username'] == UserModel.cls.DEFAULT_USER: | |
|
67 | return False | |
|
68 | return True | |
|
69 | _users = filter(maybe_skip_default_user, _users) | |
|
70 | ||
|
64 | 71 | if include_groups: |
|
65 | 72 | # extend with user groups |
|
66 | 73 | _user_groups = UserGroupModel().get_user_groups( |
General Comments 0
You need to be logged in to leave comments.
Login now