diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 89ba691..1c71453 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -4,7 +4,7 @@ on: branches: [ "main" ] env: upstream_version: v0.10.3 - etke_version: etke3 + etke_version: etke4 bunny_version: v0.1.0 permissions: checks: write diff --git a/README.md b/README.md index 6dc9849..531d5ff 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ The following changes are already implemented: * [Prevent admins from deleting themselves](https://github.com/etkecc/synapse-admin/pull/1) * [Fix user's default tab not being shown](https://github.com/etkecc/synapse-admin/pull/8) * [Add identifier when authorizing with password](https://github.com/Awesome-Technologies/synapse-admin/pull/601) +* [Add ability to toggle whether to show locked users](https://github.com/Awesome-Technologies/synapse-admin/pull/573) _the list will be updated as new changes are added_ diff --git a/src/i18n/en.ts b/src/i18n/en.ts index c6ef695..5fa1dda 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -124,6 +124,7 @@ const en: SynapseTranslationMessages = { erased: "Erased", guests: "Show guests", show_deactivated: "Show deactivated users", + show_locked: "Show locked users", user_id: "Search user", displayname: "Displayname", password: "Password", diff --git a/src/i18n/index.d.ts b/src/i18n/index.d.ts index 8a2abb5..c3662f1 100644 --- a/src/i18n/index.d.ts +++ b/src/i18n/index.d.ts @@ -120,6 +120,7 @@ interface SynapseTranslationMessages extends TranslationMessages { erased?: string; // TODO: fa, fr, it, zh guests: string; show_deactivated: string; + show_locked?: string; // TODO: de, fa, fr, it, zh user_id: string; displayname: string; password: string; diff --git a/src/resources/users.tsx b/src/resources/users.tsx index f1085d3..12387c1 100644 --- a/src/resources/users.tsx +++ b/src/resources/users.tsx @@ -98,6 +98,7 @@ const userFilters = [ , , , + , ]; const UserPreventSelfDelete: React.FC<{ children: React.ReactNode, ownUserIsSelected: boolean }> = (props) => { @@ -150,7 +151,7 @@ export const UserList = (props: ListProps) => ( } pagination={} diff --git a/src/synapse/dataProvider.ts b/src/synapse/dataProvider.ts index d74b206..41b05dc 100644 --- a/src/synapse/dataProvider.ts +++ b/src/synapse/dataProvider.ts @@ -491,7 +491,7 @@ function getSearchOrder(order: "ASC" | "DESC") { const dataProvider: SynapseDataProvider = { getList: async (resource, params) => { console.log("getList " + resource); - const { user_id, name, guests, deactivated, search_term, destination, valid } = params.filter; + const { user_id, name, guests, deactivated, locked, search_term, destination, valid } = params.filter; const { page, perPage } = params.pagination; const { field, order } = params.sort; const from = (page - 1) * perPage; @@ -504,6 +504,7 @@ const dataProvider: SynapseDataProvider = { destination: destination, guests: guests, deactivated: deactivated, + locked: locked, valid: valid, order_by: field, dir: getSearchOrder(order),