From b718da632061145cc035b622554ae710bd1dd14d Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 8 Apr 2024 10:10:42 -0500 Subject: [PATCH] Updates based on feedback Signed-off-by: Andre Wanlin --- docs/backend-system/building-backends/08-migrating.md | 10 ++++++---- ...rify-backend-feature.js => list-backend-feature.js} | 0 2 files changed, 6 insertions(+), 4 deletions(-) rename scripts/{verify-backend-feature.js => list-backend-feature.js} (100%) diff --git a/docs/backend-system/building-backends/08-migrating.md b/docs/backend-system/building-backends/08-migrating.md index 24cd0f7826..0e59fa5367 100644 --- a/docs/backend-system/building-backends/08-migrating.md +++ b/docs/backend-system/building-backends/08-migrating.md @@ -1186,11 +1186,13 @@ import { } from '@backstage/plugin-permission-node'; import { policyExtensionPoint } from '@backstage/plugin-permission-node/alpha'; -class ExampleAllowAllPermissionPolicy implements PermissionPolicy { +class CustomPermissionPolicy implements PermissionPolicy { async handle( - _request: PolicyQuery, - _user?: BackstageIdentityResponse, + request: PolicyQuery, + user?: BackstageIdentityResponse, ): Promise { + // TODO: Add code here that inspects the incoming request and user, and returns AuthorizeResult.ALLOW, AuthorizeResult.DENY, or AuthorizeResult.CONDITIONAL as needed. See the docs at https://backstage.io/docs/permissions/writing-a-policy for more information + return { result: AuthorizeResult.ALLOW, }; @@ -1230,7 +1232,7 @@ const backend = createBackend(); // Other plugins... /* highlight-add-start */ -backend.add(import('@backstage/plugin-search-backend-module-catalog/alpha')); +backend.add(import('@backstage/plugin-search-backend-module-techdocs/alpha')); /* highlight-add-end */ ``` diff --git a/scripts/verify-backend-feature.js b/scripts/list-backend-feature.js similarity index 100% rename from scripts/verify-backend-feature.js rename to scripts/list-backend-feature.js