create-app: add changeset for new search-backend createRouter params

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2022-01-25 13:23:40 +00:00
parent bd895e5812
commit 01b27d547c
+25
View File
@@ -0,0 +1,25 @@
---
'@backstage/create-app': patch
---
Added three additional required properties to the search-backend `createRouter` function to support filtering search results based on permissions. To make this change to an existing app, add the required parameters to the `createRouter` call in `packages/backend/src/plugins/search.ts`:
```diff
export default async function createPlugin({
logger,
+ permissions,
discovery,
config,
tokenManager,
}: PluginEnvironment) {
/* ... */
return await createRouter({
engine: indexBuilder.getSearchEngine(),
+ types: indexBuilder.getDocumentTypes(),
+ permissions,
+ config,
logger,
});
}
```