From 9a98a96f9e8314a501d0c619152a8fa23d16f717 Mon Sep 17 00:00:00 2001 From: Joon Park Date: Mon, 17 Apr 2023 14:36:58 +0100 Subject: [PATCH] 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 --- .changeset/sour-bulldogs-bow.md | 5 +++++ plugins/playlist-backend/src/service/router.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/sour-bulldogs-bow.md diff --git a/.changeset/sour-bulldogs-bow.md b/.changeset/sour-bulldogs-bow.md new file mode 100644 index 0000000000..2ef2a66bac --- /dev/null +++ b/.changeset/sour-bulldogs-bow.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-playlist-backend': minor +--- + +Exposes the announcements plugin's permissions in a metadata endpoint. diff --git a/plugins/playlist-backend/src/service/router.ts b/plugins/playlist-backend/src/service/router.ts index bf0b789b7a..0397bff2ff 100644 --- a/plugins/playlist-backend/src/service/router.ts +++ b/plugins/playlist-backend/src/service/router.ts @@ -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,