@backstage-community/plugin-rbac 1.51.0 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @backstage-community/plugin-rbac
2
2
 
3
+ ## 1.52.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8993474: Backstage version bump to v1.49.2
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [8993474]
12
+ - @backstage-community/plugin-rbac-common@1.26.0
13
+
3
14
  ## 1.51.0
4
15
 
5
16
  ### Minor Changes
@@ -1,10 +1,13 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { PageBlueprint } from '@backstage/frontend-plugin-api';
3
- import { rootRouteRef } from '../routes.esm.js';
3
+ import RbacIcon from '@mui/icons-material/VpnKeyOutlined';
4
+ import { rootRouteRef } from './routes.esm.js';
4
5
 
5
6
  const rbacPage = PageBlueprint.make({
6
7
  params: {
7
8
  path: "/rbac",
9
+ title: "RBAC",
10
+ icon: /* @__PURE__ */ jsx(RbacIcon, {}),
8
11
  routeRef: rootRouteRef,
9
12
  loader: async () => import('../components/Router.esm.js').then((m) => /* @__PURE__ */ jsx(m.Router, {}))
10
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pages.esm.js","sources":["../../src/alpha/pages.tsx"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PageBlueprint } from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from '../routes';\n\n/**\n * @alpha\n */\nexport const rbacPage = PageBlueprint.make({\n params: {\n path: '/rbac',\n routeRef: rootRouteRef,\n loader: async () => import('../components/Router').then(m => <m.Router />),\n },\n});\n\nexport default rbacPage;\n"],"names":[],"mappings":";;;;AAsBa,MAAA,QAAA,GAAW,cAAc,IAAK,CAAA;AAAA,EACzC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,QAAU,EAAA,YAAA;AAAA,IACV,MAAA,EAAQ,YAAY,OAAO,6BAAsB,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,qBAAM,GAAA,CAAA,CAAA,CAAE,MAAF,EAAA,EAAS,CAAE;AAAA;AAE7E,CAAC;;;;"}
1
+ {"version":3,"file":"pages.esm.js","sources":["../../src/alpha/pages.tsx"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PageBlueprint } from '@backstage/frontend-plugin-api';\nimport { default as RbacIcon } from '@mui/icons-material/VpnKeyOutlined';\nimport { rootRouteRef } from './routes';\n\n/**\n * @alpha\n */\nexport const rbacPage = PageBlueprint.make({\n params: {\n path: '/rbac',\n title: 'RBAC',\n icon: <RbacIcon />,\n routeRef: rootRouteRef,\n loader: async () => import('../components/Router').then(m => <m.Router />),\n },\n});\n\nexport default rbacPage;\n"],"names":[],"mappings":";;;;;AAuBa,MAAA,QAAA,GAAW,cAAc,IAAK,CAAA;AAAA,EACzC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,KAAO,EAAA,MAAA;AAAA,IACP,IAAA,sBAAO,QAAS,EAAA,EAAA,CAAA;AAAA,IAChB,QAAU,EAAA,YAAA;AAAA,IACV,MAAA,EAAQ,YAAY,OAAO,6BAAsB,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,qBAAM,GAAA,CAAA,CAAA,CAAE,MAAF,EAAA,EAAS,CAAE;AAAA;AAE7E,CAAC;;;;"}
@@ -0,0 +1,18 @@
1
+ import { createRouteRef, createSubRouteRef } from '@backstage/frontend-plugin-api';
2
+
3
+ const rootRouteRef = createRouteRef();
4
+ createSubRouteRef({
5
+ parent: rootRouteRef,
6
+ path: "/roles/:roleKind/:roleNamespace/:roleName"
7
+ });
8
+ createSubRouteRef({
9
+ parent: rootRouteRef,
10
+ path: "/role/new"
11
+ });
12
+ createSubRouteRef({
13
+ parent: rootRouteRef,
14
+ path: "/role/:roleKind/:roleNamespace/:roleName"
15
+ });
16
+
17
+ export { rootRouteRef };
18
+ //# sourceMappingURL=routes.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.esm.js","sources":["../../src/alpha/routes.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createRouteRef,\n createSubRouteRef,\n} from '@backstage/frontend-plugin-api';\n\nexport const rootRouteRef = createRouteRef();\n\nexport const roleRouteRef = createSubRouteRef({\n parent: rootRouteRef,\n path: '/roles/:roleKind/:roleNamespace/:roleName',\n});\n\nexport const createRoleRouteRef = createSubRouteRef({\n parent: rootRouteRef,\n path: '/role/new',\n});\n\nexport const editRoleRouteRef = createSubRouteRef({\n parent: rootRouteRef,\n path: '/role/:roleKind/:roleNamespace/:roleName',\n});\n"],"names":[],"mappings":";;AAoBO,MAAM,eAAe,cAAe;AAEf,iBAAkB,CAAA;AAAA,EAC5C,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEiC,iBAAkB,CAAA;AAAA,EAClD,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAE+B,iBAAkB,CAAA;AAAA,EAChD,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- /// <reference types="react" />
2
1
  import * as react from 'react';
3
2
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
4
- import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
5
3
 
6
4
  /**
7
5
  * Translation reference for RBAC plugin
@@ -189,7 +187,7 @@ declare const rbacTranslations: _backstage_frontend_plugin_api.TranslationResour
189
187
  * @alpha
190
188
  */
191
189
  declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{
192
- root: _backstage_core_plugin_api.RouteRef<undefined>;
190
+ root: _backstage_frontend_plugin_api.RouteRef<undefined>;
193
191
  }, {}, {
194
192
  "api:rbac/licensed-users": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
195
193
  kind: "api";
@@ -198,9 +196,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
198
196
  configInput: {};
199
197
  output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
200
198
  inputs: {};
201
- params: <TApi, TImpl extends TApi, TDeps extends {
202
- [x: string]: unknown;
203
- }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
199
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
204
200
  }>;
205
201
  "api:rbac/rbac": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
206
202
  kind: "api";
@@ -209,26 +205,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
209
205
  configInput: {};
210
206
  output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
211
207
  inputs: {};
212
- params: <TApi, TImpl extends TApi, TDeps extends {
213
- [x: string]: unknown;
214
- }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
215
- }>;
216
- "nav-item:rbac": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
217
- kind: "nav-item";
218
- name: undefined;
219
- config: {};
220
- configInput: {};
221
- output: _backstage_frontend_plugin_api.ExtensionDataRef<{
222
- title: string;
223
- icon: _backstage_frontend_plugin_api.IconComponent;
224
- routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
225
- }, "core.nav-item.target", {}>;
226
- inputs: {};
227
- params: {
228
- title: string;
229
- icon: _backstage_frontend_plugin_api.IconComponent;
230
- routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
231
- };
208
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
232
209
  }>;
233
210
  "page:rbac": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
234
211
  kind: "page";
@@ -262,13 +239,12 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
262
239
  }>;
263
240
  };
264
241
  params: {
265
- defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
266
242
  path: string;
267
- title?: string | undefined;
268
- icon?: _backstage_frontend_plugin_api.IconElement | undefined;
269
- loader?: (() => Promise<react.JSX.Element>) | undefined;
270
- routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
271
- noHeader?: boolean | undefined;
243
+ title?: string;
244
+ icon?: _backstage_frontend_plugin_api.IconElement;
245
+ loader?: () => Promise<react.JSX.Element>;
246
+ routeRef?: _backstage_frontend_plugin_api.RouteRef;
247
+ noHeader?: boolean;
272
248
  };
273
249
  }>;
274
250
  }>;
package/dist/alpha.esm.js CHANGED
@@ -1,16 +1,15 @@
1
1
  import { createFrontendPlugin, createFrontendModule } from '@backstage/frontend-plugin-api';
2
2
  import { TranslationBlueprint } from '@backstage/plugin-app-react';
3
3
  import { rbacApi, licensedUsersApi } from './alpha/apis.esm.js';
4
- import { rbacNavItem } from './alpha/navItems.esm.js';
5
4
  import { rbacPage } from './alpha/pages.esm.js';
6
- import { rootRouteRef } from './routes.esm.js';
5
+ import { rootRouteRef } from './alpha/routes.esm.js';
7
6
  import { rbacTranslations } from './alpha/translations/index.esm.js';
8
7
  export { rbacTranslationRef } from './alpha/translations/ref.esm.js';
9
8
 
10
9
  var index = createFrontendPlugin({
11
10
  pluginId: "rbac",
12
11
  info: { packageJson: () => import('./package.json.esm.js') },
13
- extensions: [rbacApi, licensedUsersApi, rbacPage, rbacNavItem],
12
+ extensions: [rbacApi, licensedUsersApi, rbacPage],
14
13
  routes: {
15
14
  root: rootRouteRef
16
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createFrontendPlugin,\n createFrontendModule,\n} from '@backstage/frontend-plugin-api';\nimport { TranslationBlueprint } from '@backstage/plugin-app-react';\nimport { rbacApi, licensedUsersApi } from './apis';\nimport rbacNavItem from './navItems';\nimport rbacPage from './pages';\nimport { rootRouteRef } from '../routes';\nimport { rbacTranslations } from './translations';\n\n/**\n * RBAC plugin\n * @alpha\n */\n\nexport default createFrontendPlugin({\n pluginId: 'rbac',\n info: { packageJson: () => import('../../package.json') },\n extensions: [rbacApi, licensedUsersApi, rbacPage, rbacNavItem],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Translation module for the rbac plugin\n * @alpha\n */\n\nconst rbacTranslationsModule = createFrontendModule({\n pluginId: 'app',\n extensions: [\n TranslationBlueprint.make({\n name: 'rbac-translations',\n params: {\n resource: rbacTranslations,\n },\n }),\n ],\n});\n\nexport { rbacTranslationsModule };\n\nexport { rbacTranslationRef, rbacTranslations } from './translations';\n"],"names":[],"mappings":";;;;;;;;;AAgCA,YAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,MAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAoB,CAAE,EAAA;AAAA,EACxD,UAAY,EAAA,CAAC,OAAS,EAAA,gBAAA,EAAkB,UAAU,WAAW,CAAA;AAAA,EAC7D,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC,CAAA;AAOD,MAAM,yBAAyB,oBAAqB,CAAA;AAAA,EAClD,QAAU,EAAA,KAAA;AAAA,EACV,UAAY,EAAA;AAAA,IACV,qBAAqB,IAAK,CAAA;AAAA,MACxB,IAAM,EAAA,mBAAA;AAAA,MACN,MAAQ,EAAA;AAAA,QACN,QAAU,EAAA;AAAA;AACZ,KACD;AAAA;AAEL,CAAC;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createFrontendPlugin,\n createFrontendModule,\n} from '@backstage/frontend-plugin-api';\nimport { TranslationBlueprint } from '@backstage/plugin-app-react';\nimport { rbacApi, licensedUsersApi } from './apis';\nimport rbacPage from './pages';\nimport { rootRouteRef } from './routes';\nimport { rbacTranslations } from './translations';\n\n/**\n * RBAC plugin\n * @alpha\n */\n\nexport default createFrontendPlugin({\n pluginId: 'rbac',\n info: { packageJson: () => import('../../package.json') },\n extensions: [rbacApi, licensedUsersApi, rbacPage],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Translation module for the rbac plugin\n * @alpha\n */\n\nconst rbacTranslationsModule = createFrontendModule({\n pluginId: 'app',\n extensions: [\n TranslationBlueprint.make({\n name: 'rbac-translations',\n params: {\n resource: rbacTranslations,\n },\n }),\n ],\n});\n\nexport { rbacTranslationsModule };\n\nexport { rbacTranslationRef, rbacTranslations } from './translations';\n"],"names":[],"mappings":";;;;;;;;AA+BA,YAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,MAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAoB,CAAE,EAAA;AAAA,EACxD,UAAY,EAAA,CAAC,OAAS,EAAA,gBAAA,EAAkB,QAAQ,CAAA;AAAA,EAChD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC,CAAA;AAOD,MAAM,yBAAyB,oBAAqB,CAAA;AAAA,EAClD,QAAU,EAAA,KAAA;AAAA,EACV,UAAY,EAAA;AAAA,IACV,qBAAqB,IAAK,CAAA;AAAA,MACxB,IAAM,EAAA,mBAAA;AAAA,MACN,MAAQ,EAAA;AAAA,QACN,QAAU,EAAA;AAAA;AACZ,KACD;AAAA;AAEL,CAAC;;;;"}
@@ -14,10 +14,7 @@ const Administration = () => {
14
14
  const config = useApi(configApiRef);
15
15
  const isRBACPluginEnabled = config.getOptionalBoolean("permission.enabled");
16
16
  if (!isUserLoading && isRBACPluginEnabled) {
17
- return result?.status === "Authorized" ? (
18
- // FIXME: improve icon type in Backstage 1.49, currently the icon type is deprecated but there is no change in the SidebarItem!?
19
- /* @__PURE__ */ jsx(SidebarItem, { text: "RBAC", to: "rbac", icon: RbacIcon })
20
- ) : null;
17
+ return result?.status === "Authorized" ? /* @__PURE__ */ jsx(SidebarItem, { text: "RBAC", to: "rbac", icon: RbacIcon }) : null;
21
18
  }
22
19
  return null;
23
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Administration.esm.js","sources":["../../src/components/Administration.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useAsync } from 'react-use';\n\nimport { SidebarItem } from '@backstage/core-components';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { default as RbacIcon } from '@mui/icons-material/VpnKeyOutlined';\n\nimport { rbacApiRef } from '../api/RBACBackendClient';\n\nexport const Administration = () => {\n const rbacApi = useApi(rbacApiRef);\n const { loading: isUserLoading, value: result } = useAsync(\n async () => await rbacApi.getUserAuthorization(),\n [],\n );\n\n const config = useApi(configApiRef);\n const isRBACPluginEnabled = config.getOptionalBoolean('permission.enabled');\n\n if (!isUserLoading && isRBACPluginEnabled) {\n return result?.status === 'Authorized' ? (\n // FIXME: improve icon type in Backstage 1.49, currently the icon type is deprecated but there is no change in the SidebarItem!?\n <SidebarItem text=\"RBAC\" to=\"rbac\" icon={RbacIcon as any} />\n ) : null;\n }\n return null;\n};\n"],"names":[],"mappings":";;;;;;;AAwBO,MAAM,iBAAiB,MAAM;AAClC,EAAM,MAAA,OAAA,GAAU,OAAO,UAAU,CAAA;AACjC,EAAA,MAAM,EAAE,OAAA,EAAS,aAAe,EAAA,KAAA,EAAO,QAAW,GAAA,QAAA;AAAA,IAChD,YAAY,MAAM,OAAA,CAAQ,oBAAqB,EAAA;AAAA,IAC/C;AAAC,GACH;AAEA,EAAM,MAAA,MAAA,GAAS,OAAO,YAAY,CAAA;AAClC,EAAM,MAAA,mBAAA,GAAsB,MAAO,CAAA,kBAAA,CAAmB,oBAAoB,CAAA;AAE1E,EAAI,IAAA,CAAC,iBAAiB,mBAAqB,EAAA;AACzC,IAAA,OAAO,QAAQ,MAAW,KAAA,YAAA;AAAA;AAAA,0BAEvB,WAAY,EAAA,EAAA,IAAA,EAAK,QAAO,EAAG,EAAA,MAAA,EAAO,MAAM,QAAiB,EAAA;AAAA,QACxD,IAAA;AAAA;AAEN,EAAO,OAAA,IAAA;AACT;;;;"}
1
+ {"version":3,"file":"Administration.esm.js","sources":["../../src/components/Administration.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useAsync } from 'react-use';\n\nimport { SidebarItem } from '@backstage/core-components';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { default as RbacIcon } from '@mui/icons-material/VpnKeyOutlined';\n\nimport { rbacApiRef } from '../api/RBACBackendClient';\n\nexport const Administration = () => {\n const rbacApi = useApi(rbacApiRef);\n const { loading: isUserLoading, value: result } = useAsync(\n async () => await rbacApi.getUserAuthorization(),\n [],\n );\n\n const config = useApi(configApiRef);\n const isRBACPluginEnabled = config.getOptionalBoolean('permission.enabled');\n\n if (!isUserLoading && isRBACPluginEnabled) {\n return result?.status === 'Authorized' ? (\n <SidebarItem text=\"RBAC\" to=\"rbac\" icon={RbacIcon} />\n ) : null;\n }\n return null;\n};\n"],"names":[],"mappings":";;;;;;;AAwBO,MAAM,iBAAiB,MAAM;AAClC,EAAM,MAAA,OAAA,GAAU,OAAO,UAAU,CAAA;AACjC,EAAA,MAAM,EAAE,OAAA,EAAS,aAAe,EAAA,KAAA,EAAO,QAAW,GAAA,QAAA;AAAA,IAChD,YAAY,MAAM,OAAA,CAAQ,oBAAqB,EAAA;AAAA,IAC/C;AAAC,GACH;AAEA,EAAM,MAAA,MAAA,GAAS,OAAO,YAAY,CAAA;AAClC,EAAM,MAAA,mBAAA,GAAsB,MAAO,CAAA,kBAAA,CAAmB,oBAAoB,CAAA;AAE1E,EAAI,IAAA,CAAC,iBAAiB,mBAAqB,EAAA;AACzC,IAAO,OAAA,MAAA,EAAQ,MAAW,KAAA,YAAA,mBACvB,GAAA,CAAA,WAAA,EAAA,EAAY,IAAK,EAAA,MAAA,EAAO,EAAG,EAAA,MAAA,EAAO,IAAM,EAAA,QAAA,EAAU,CACjD,GAAA,IAAA;AAAA;AAEN,EAAO,OAAA,IAAA;AACT;;;;"}
package/dist/index.d.ts CHANGED
@@ -19,7 +19,7 @@ declare const rbacPlugin: _backstage_core_plugin_api.BackstagePlugin<{
19
19
  * @public
20
20
  */
21
21
  declare const RbacPage: ({ useHeader }: {
22
- useHeader?: boolean | undefined;
22
+ useHeader?: boolean;
23
23
  }) => react_jsx_runtime.JSX.Element;
24
24
  /**
25
25
  * @public
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage-community/plugin-rbac";
2
- var version = "1.51.0";
2
+ var version = "1.52.0";
3
3
  var main = "src/index.ts";
4
4
  var types = "src/index.ts";
5
5
  var license = "Apache-2.0";
@@ -50,15 +50,15 @@ var scripts = {
50
50
  };
51
51
  var dependencies = {
52
52
  "@backstage-community/plugin-rbac-common": "workspace:^",
53
- "@backstage/catalog-model": "^1.7.6",
54
- "@backstage/core-components": "^0.18.7",
55
- "@backstage/core-plugin-api": "^1.12.3",
56
- "@backstage/frontend-plugin-api": "^0.14.1",
57
- "@backstage/plugin-app-react": "^0.2.0",
58
- "@backstage/plugin-catalog": "^1.33.1",
53
+ "@backstage/catalog-model": "^1.7.7",
54
+ "@backstage/core-components": "^0.18.8",
55
+ "@backstage/core-plugin-api": "^1.12.4",
56
+ "@backstage/frontend-plugin-api": "^0.15.1",
57
+ "@backstage/plugin-app-react": "^0.2.1",
58
+ "@backstage/plugin-catalog": "^2.0.1",
59
59
  "@backstage/plugin-catalog-common": "^1.1.8",
60
- "@backstage/plugin-permission-common": "^0.9.6",
61
- "@backstage/plugin-permission-react": "^0.4.40",
60
+ "@backstage/plugin-permission-common": "^0.9.7",
61
+ "@backstage/plugin-permission-react": "^0.4.41",
62
62
  "@backstage/theme": "^0.7.2",
63
63
  "@mui/icons-material": "5.18.0",
64
64
  "@mui/material": "^5.14.18",
@@ -79,12 +79,12 @@ var peerDependencies = {
79
79
  };
80
80
  var devDependencies = {
81
81
  "@axe-core/playwright": "^4.11.0",
82
- "@backstage/cli": "^0.35.4",
83
- "@backstage/core-app-api": "^1.19.5",
84
- "@backstage/dev-utils": "^1.1.20",
85
- "@backstage/frontend-defaults": "^0.4.0",
86
- "@backstage/test-utils": "^1.7.15",
87
- "@backstage/ui": "^0.12.0",
82
+ "@backstage/cli": "^0.36.0",
83
+ "@backstage/core-app-api": "^1.19.6",
84
+ "@backstage/dev-utils": "^1.1.21",
85
+ "@backstage/frontend-defaults": "^0.5.0",
86
+ "@backstage/test-utils": "^1.7.16",
87
+ "@backstage/ui": "^0.13.1",
88
88
  "@playwright/test": "^1.56.1",
89
89
  "@testing-library/dom": "^10.0.0",
90
90
  "@testing-library/jest-dom": "^6.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-rbac",
3
- "version": "1.51.0",
3
+ "version": "1.52.0",
4
4
  "main": "./dist/index.esm.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -62,16 +62,16 @@
62
62
  "ui-test:legacy": "start-server-and-test start:legacy localhost:3000 'playwright test'"
63
63
  },
64
64
  "dependencies": {
65
- "@backstage-community/plugin-rbac-common": "^1.25.0",
66
- "@backstage/catalog-model": "^1.7.6",
67
- "@backstage/core-components": "^0.18.7",
68
- "@backstage/core-plugin-api": "^1.12.3",
69
- "@backstage/frontend-plugin-api": "^0.14.1",
70
- "@backstage/plugin-app-react": "^0.2.0",
71
- "@backstage/plugin-catalog": "^1.33.1",
65
+ "@backstage-community/plugin-rbac-common": "^1.26.0",
66
+ "@backstage/catalog-model": "^1.7.7",
67
+ "@backstage/core-components": "^0.18.8",
68
+ "@backstage/core-plugin-api": "^1.12.4",
69
+ "@backstage/frontend-plugin-api": "^0.15.1",
70
+ "@backstage/plugin-app-react": "^0.2.1",
71
+ "@backstage/plugin-catalog": "^2.0.1",
72
72
  "@backstage/plugin-catalog-common": "^1.1.8",
73
- "@backstage/plugin-permission-common": "^0.9.6",
74
- "@backstage/plugin-permission-react": "^0.4.40",
73
+ "@backstage/plugin-permission-common": "^0.9.7",
74
+ "@backstage/plugin-permission-react": "^0.4.41",
75
75
  "@backstage/theme": "^0.7.2",
76
76
  "@mui/icons-material": "5.18.0",
77
77
  "@mui/material": "^5.14.18",
@@ -92,12 +92,12 @@
92
92
  },
93
93
  "devDependencies": {
94
94
  "@axe-core/playwright": "^4.11.0",
95
- "@backstage/cli": "^0.35.4",
96
- "@backstage/core-app-api": "^1.19.5",
97
- "@backstage/dev-utils": "^1.1.20",
98
- "@backstage/frontend-defaults": "^0.4.0",
99
- "@backstage/test-utils": "^1.7.15",
100
- "@backstage/ui": "^0.12.0",
95
+ "@backstage/cli": "^0.36.0",
96
+ "@backstage/core-app-api": "^1.19.6",
97
+ "@backstage/dev-utils": "^1.1.21",
98
+ "@backstage/frontend-defaults": "^0.5.0",
99
+ "@backstage/test-utils": "^1.7.16",
100
+ "@backstage/ui": "^0.13.1",
101
101
  "@playwright/test": "^1.56.1",
102
102
  "@testing-library/dom": "^10.0.0",
103
103
  "@testing-library/jest-dom": "^6.0.0",
@@ -1,15 +0,0 @@
1
- import { NavItemBlueprint } from '@backstage/frontend-plugin-api';
2
- import { rootRouteRef } from '../routes.esm.js';
3
- import RbacIcon from '@mui/icons-material/VpnKeyOutlined';
4
-
5
- const rbacNavItem = NavItemBlueprint.make({
6
- params: {
7
- title: "RBAC",
8
- routeRef: rootRouteRef,
9
- // FIXME: improve icon type in Backstage 1.49, currently the icon type is deprecated but there is no change in the NavItemBlueprint!?
10
- icon: RbacIcon
11
- }
12
- });
13
-
14
- export { rbacNavItem as default, rbacNavItem };
15
- //# sourceMappingURL=navItems.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"navItems.esm.js","sources":["../../src/alpha/navItems.tsx"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NavItemBlueprint } from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from '../routes';\nimport { RbacIcon } from '..';\n\nexport const rbacNavItem = NavItemBlueprint.make({\n params: {\n title: 'RBAC',\n routeRef: rootRouteRef,\n // FIXME: improve icon type in Backstage 1.49, currently the icon type is deprecated but there is no change in the NavItemBlueprint!?\n icon: RbacIcon as any,\n },\n});\n\nexport default rbacNavItem;\n"],"names":[],"mappings":";;;;AAoBa,MAAA,WAAA,GAAc,iBAAiB,IAAK,CAAA;AAAA,EAC/C,MAAQ,EAAA;AAAA,IACN,KAAO,EAAA,MAAA;AAAA,IACP,QAAU,EAAA,YAAA;AAAA;AAAA,IAEV,IAAM,EAAA;AAAA;AAEV,CAAC;;;;"}