Updates based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2024-04-08 10:10:42 -05:00
parent cd716e42f6
commit b718da6320
2 changed files with 6 additions and 4 deletions
@@ -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<PolicyDecision> {
// 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 */
```