Skip to content

Commit

Permalink
Improve the "user_admin_people" view for users
Browse files Browse the repository at this point in the history
The filtering system has been updated to support the inclusion or exclusion of patrons and users without roles. By default, this view displays all users with a role, while excluding patrons.
  • Loading branch information
kasperbirch1 committed Sep 20, 2024
1 parent cb7dee2 commit dcc7599
Showing 1 changed file with 178 additions and 34 deletions.
212 changes: 178 additions & 34 deletions config/sync/views.view.user_admin_people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- user.role.external_system
- user.role.local_administrator
- user.role.mediator
- user.role.patron
module:
- better_exposed_filters
- user
Expand Down Expand Up @@ -611,24 +612,38 @@ display:
options_show_only_used_filtered: false
options_hide_when_empty: false
options_show_items_count: false
permission:
plugin_id: default
advanced:
sort_options: false
rewrite:
filter_rewrite_values: ''
filter_rewrite_values_key: false
collapsible: false
collapsible_disable_automatic_open: false
is_secondary: false
options_show_only_used: false
options_show_only_used_filtered: false
options_hide_when_empty: false
options_show_items_count: false
roles_target_id:
plugin_id: bef
advanced:
sort_options: false
rewrite:
filter_rewrite_values: ''
filter_rewrite_values_key: false
collapsible: true
collapsible: false
collapsible_disable_automatic_open: false
is_secondary: false
select_all_none: true
select_all_none: false
select_all_none_nested: false
display_inline: true
options_show_only_used: false
options_show_only_used_filtered: false
options_hide_when_empty: false
options_show_items_count: false
permission:
roles_target_id_1:
plugin_id: default
advanced:
sort_options: false
Expand Down Expand Up @@ -778,35 +793,30 @@ display:
title: Blocked
operator: '='
value: '0'
roles_target_id:
id: roles_target_id
permission:
id: permission
table: user__roles
field: roles_target_id
field: permission
relationship: none
group_type: group
admin_label: ''
plugin_id: user_roles
plugin_id: user_permissions
operator: or
value:
administrator: administrator
local_administrator: local_administrator
editor: editor
mediator: mediator
external_system: external_system
value: { }
group: 1
exposed: true
expose:
operator_id: roles_target_id_op
label: Role
operator_id: permission_op
label: Permission
description: ''
use_operator: false
operator: roles_target_id_op
operator: permission_op
operator_limit_selection: false
operator_list: { }
identifier: role
identifier: permission
required: false
remember: false
multiple: true
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
Expand All @@ -816,7 +826,7 @@ display:
mediator: '0'
patron: '0'
external_system: '0'
reduce: true
reduce: false
is_grouped: false
group_info:
label: ''
Expand All @@ -830,27 +840,29 @@ display:
default_group_multiple: { }
group_items: { }
reduce_duplicates: false
permission:
id: permission
roles_target_id_1:
id: roles_target_id_1
table: user__roles
field: permission
field: roles_target_id
relationship: none
group_type: group
admin_label: ''
plugin_id: user_permissions
operator: or
entity_type: user
entity_field: roles
plugin_id: user_roles
operator: not
value: { }
group: 1
exposed: true
expose:
operator_id: permission_op
label: Permission
operator_id: roles_target_id_1_op
label: 'Has no role'
description: ''
use_operator: false
operator: permission_op
operator: roles_target_id_1_op
operator_limit_selection: false
operator_list: { }
identifier: permission
identifier: no_roles
required: false
remember: false
multiple: false
Expand All @@ -864,18 +876,98 @@ display:
patron: '0'
external_system: '0'
reduce: false
is_grouped: false
is_grouped: true
group_info:
label: ''
label: 'Has role'
description: ''
identifier: ''
identifier: has_role
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group: '2'
default_group_multiple: { }
group_items: { }
group_items:
1:
title: 'Has no role'
operator: not
value:
administrator: administrator
local_administrator: local_administrator
editor: editor
mediator: mediator
patron: patron
external_system: external_system
2:
title: 'Has role'
operator: or
value:
administrator: administrator
local_administrator: local_administrator
editor: editor
mediator: mediator
patron: patron
external_system: external_system
reduce_duplicates: false
roles_target_id_2:
id: roles_target_id_2
table: user__roles
field: roles_target_id
relationship: none
group_type: group
admin_label: ''
entity_type: user
entity_field: roles
plugin_id: user_roles
operator: or
value:
patron: patron
group: 1
exposed: true
expose:
operator_id: roles_target_id_2_op
label: 'Include patron'
description: ''
use_operator: false
operator: roles_target_id_2_op
operator_limit_selection: false
operator_list: { }
identifier: patron
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
administrator: '0'
local_administrator: '0'
editor: '0'
mediator: '0'
patron: '0'
external_system: '0'
reduce: false
is_grouped: true
group_info:
label: 'Include patron'
description: ''
identifier: roles_target_id_2
optional: true
widget: select
multiple: false
remember: false
default_group: '2'
default_group_multiple: { }
group_items:
1:
title: 'Include patrons'
operator: or
value:
patron: patron
2:
title: 'Exclude patrons'
operator: not
value:
patron: patron
reduce_duplicates: false
default_langcode:
id: default_langcode
Expand Down Expand Up @@ -917,6 +1009,58 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
roles_target_id:
id: roles_target_id
table: user__roles
field: roles_target_id
relationship: none
group_type: group
admin_label: ''
plugin_id: user_roles
operator: or
value:
administrator: administrator
local_administrator: local_administrator
editor: editor
mediator: mediator
external_system: external_system
group: 1
exposed: true
expose:
operator_id: roles_target_id_op
label: Role
description: ''
use_operator: false
operator: roles_target_id_op
operator_limit_selection: false
operator_list: { }
identifier: role
required: false
remember: false
multiple: true
remember_roles:
authenticated: authenticated
anonymous: '0'
administrator: '0'
local_administrator: '0'
editor: '0'
mediator: '0'
patron: '0'
external_system: '0'
reduce: true
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
reduce_duplicates: false
filter_groups:
operator: AND
groups:
Expand Down Expand Up @@ -1001,7 +1145,7 @@ display:
options:
query_comment: ''
disable_sql_rewrite: false
distinct: false
distinct: true
replica: false
query_tags: { }
css_class: ''
Expand Down

0 comments on commit dcc7599

Please sign in to comment.