Add missing createPermissionIntegrationRouter call

We (the permission framework maintainers) updated the correct usage of createPermissionIntegrationRouter, but the docs remained outdated. As part of fixing the docs (https://github.com/backstage/backstage/pull/17388) we're making PRs to help fix the issue in community plugins as well.

Signed-off-by: Joon Park <joonp@spotify.com>
This commit is contained in:
Joon Park
2023-04-17 14:36:58 +01:00
parent a80d2e69ba
commit 9a98a96f9e
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-playlist-backend': minor
---
Exposes the announcements plugin's permissions in a metadata endpoint.
@@ -112,6 +112,7 @@ export async function createRouter(
};
const permissionIntegrationRouter = createPermissionIntegrationRouter({
permissions: Object.values(permissions),
getResources: resourceRefs =>
Promise.all(resourceRefs.map(ref => dbHandler.getPlaylist(ref))),
resourceType: PLAYLIST_LIST_RESOURCE_TYPE,