Skip to content

Commit

Permalink
feat(rbac): turn rbac plugin into a dynamic plugin (janus-idp#1133)
Browse files Browse the repository at this point in the history
* feat(rbac): turn rbac plugin into a dynamic plugin

* Removed changes made accidentally

Signed-off-by: Yi Cai <yicai@redhat.com>

* Checkout upstream yarn.lock

Signed-off-by: Yi Cai <yicai@redhat.com>

* Checkout upstream main yarn.lock

Signed-off-by: Yi Cai <yicai@redhat.com>

---------

Signed-off-by: Yi Cai <yicai@redhat.com>
  • Loading branch information
ciiay authored Jan 31, 2024
1 parent 2a42780 commit b9b36d5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
7 changes: 7 additions & 0 deletions plugins/rbac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The RBAC UI plugin offers a streamlined user interface for effectively managing

### Installation

#### Installing as a dynamic plugin?

The sections below are relevant for static plugins. If the plugin is expected to be installed as a dynamic one:

- follow https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/dynamic-plugins.md#installing-a-dynamic-plugin-package-in-the-showcase
- add content of `app-config.janus-idp.yaml` into `app-config.local.yaml`.

#### Prerequisites

Follow the RBAC backend plugin [README](https://github.com/janus-idp/backstage-plugins/tree/main/plugins/rbac-backend) to integrate rbac in your Backstage instance
Expand Down
14 changes: 14 additions & 0 deletions plugins/rbac/app-config.janus-idp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dynamicPlugins:
frontend:
janus-idp.backstage-plugin-rbac:
appIcons:
- name: AdminPanelSettingsOutlinedIcon
module: RbacPlugin
importName: AdminPanelSettingsOutlinedIcon
dynamicRoutes:
- path: /rbac
importName: RbacPage
module: RbacPlugin
menuItem:
icon: AdminPanelSettingsOutlinedIcon
text: Administration
9 changes: 8 additions & 1 deletion plugins/rbac/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,16 @@
"@types/node": "18.18.5",
"msw": "1.3.2"
},
"scalprum": {
"name": "janus-idp.backstage-plugin-rbac",
"exposedModules": {
"RbacPlugin": "./src/index.ts"
}
},
"files": [
"dist",
"dist-scalprum"
"dist-scalprum",
"app-config.janus-idp.yaml"
],
"repository": "github:janus-idp/backstage-plugins",
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions plugins/rbac/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export { rbacPlugin, RbacPage, Administration } from './plugin';

export { default as AdminPanelSettingsOutlinedIcon } from '@mui/icons-material/AdminPanelSettingsOutlined';

0 comments on commit b9b36d5

Please sign in to comment.