Merge pull request #18311 from adobejmong/ETHOS-48559-disable-register-new-component

docs: section on how to disable the register existing component button
This commit is contained in:
Fredrik Adelöw
2023-06-20 10:27:04 +02:00
committed by GitHub
2 changed files with 24 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

+24
View File
@@ -74,3 +74,27 @@ you to the registered component in the catalog:
And then you'll also be able to see it in the Catalog View table:
![Catalog](../../assets/software-templates/added-to-the-catalog-list.png)
## Disable Register Existing Component button
There could be situations where you would like to disable the
`Register Existing Component` button for your users. For example:
![Disable Button](../../assets/software-templates/disable-register-existing-component-button.png)
To do so, you will un-register / remove the `catalogImportPlugin.routes.importPage`
from `backstage/packages/app/src/App.tsx`:
```diff
const app = createApp({
apis,
bindRoutes({ bind }) {
- bind(scaffolderPlugin.externalRoutes, {
- registerComponent: catalogImportPlugin.routes.importPage,
- });
bind(orgPlugin.externalRoutes, {
catalogIndex: catalogPlugin.routes.catalogIndex,
});
```
After the change, you should no longer see the button.