Add ability to toggle whether to show locked users

This is almost copy of https://github.com/Awesome-Technologies/synapse-admin/pull/573 PR,
authored by @huw1990
This commit is contained in:
Aine
2024-09-03 11:09:46 +03:00
parent 7747dc7f28
commit 50c96cfd77
6 changed files with 8 additions and 3 deletions

View File

@@ -98,6 +98,7 @@ const userFilters = [
<SearchInput source="name" alwaysOn />,
<BooleanInput source="guests" alwaysOn />,
<BooleanInput label="resources.users.fields.show_deactivated" source="deactivated" alwaysOn />,
<BooleanInput label="resources.users.fields.show_locked" source="locked" alwaysOn />,
];
const UserPreventSelfDelete: React.FC<{ children: React.ReactNode, ownUserIsSelected: boolean }> = (props) => {
@@ -150,7 +151,7 @@ export const UserList = (props: ListProps) => (
<List
{...props}
filters={userFilters}
filterDefaultValues={{ guests: true, deactivated: false }}
filterDefaultValues={{ guests: true, deactivated: false, locked: false }}
sort={{ field: "name", order: "ASC" }}
actions={<UserListActions />}
pagination={<UserPagination />}