Complete permission-aware native search indexing

This commit is contained in:
2026-08-04 03:05:03 +02:00
parent 912db10a8a
commit 1bb338117f
12 changed files with 680 additions and 26 deletions
+27 -1
View File
@@ -1,5 +1,6 @@
import { createElement, lazy } from "react";
import type {
AdminSectionsUiCapability,
PlatformWebModule,
SearchRuntimeUiCapability
} from "@govoplan/core-webui";
@@ -8,12 +9,29 @@ import "./styles/search.css";
const SearchPage = lazy(() => import("./features/search/SearchPage"));
const SearchAdminPanel = lazy(() => import("./features/search/SearchAdminPanel"));
const searchRuntime: SearchRuntimeUiCapability = {
GlobalSearch,
anyOf: ["search:result:read"]
};
const searchAdminSections: AdminSectionsUiCapability = {
sections: [
{
id: "tenant-search-index",
moduleId: "search",
kind: "operations",
surfaceId: "search.admin.index",
label: "Search index",
group: "TENANT",
order: 69,
allOf: ["search:index:admin"],
render: ({ settings }) => createElement(SearchAdminPanel, { settings })
}
]
};
export const searchModule: PlatformWebModule = {
id: "search",
label: "Search",
@@ -50,10 +68,18 @@ export const searchModule: PlatformWebModule = {
kind: "route",
label: "Search results",
order: 20
},
{
id: "search.admin.index",
moduleId: "search",
kind: "section",
label: "Search index administration",
order: 30
}
],
uiCapabilities: {
"search.runtime": searchRuntime
"search.runtime": searchRuntime,
"admin.sections": searchAdminSections
}
};