Minor updates to the Pemissions docs
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
@@ -49,6 +49,8 @@ The api for providing custom rules may differ between plugins, but there should
|
||||
// packages/backend/src/plugins/catalog.ts
|
||||
|
||||
import { isInSystemRule } from './permission';
|
||||
// The CatalogBuilder with the addPermissionRules function is in the alpha path
|
||||
import { CatalogBuilder } from '@backstage/plugin-catalog-backend/alpha';
|
||||
|
||||
...
|
||||
|
||||
@@ -56,7 +58,7 @@ export default async function createPlugin(
|
||||
env: PluginEnvironment,
|
||||
): Promise<Router> {
|
||||
const builder = await CatalogBuilder.create(env);
|
||||
builder.addPermissionRules(isInSystem);
|
||||
builder.addPermissionRules(isInSystemRule);
|
||||
...
|
||||
return router;
|
||||
}
|
||||
|
||||
@@ -77,10 +77,7 @@ export default async function createPlugin(
|
||||
logger: env.logger,
|
||||
discovery: env.discovery,
|
||||
policy: new TestPermissionPolicy(),
|
||||
identity: IdentityClient.create({
|
||||
discovery: env.discovery,
|
||||
issuer: await env.discovery.getExternalBaseUrl('auth'),
|
||||
}),
|
||||
identity: env.identity,
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user