@spotify/backstage-plugin-rbac 0.8.5 → 0.8.6
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 +12 -0
- package/config.d.ts +6 -0
- package/dist/alpha/pages.esm.js +1 -1
- package/dist/alpha.d.ts +0 -1
- package/dist/components/Layout/PageWrapper.esm.js +1 -1
- package/dist/components/Layout/ShowHeaderContext.esm.js +2 -0
- package/dist/components/PolicyTester/usePolicyTesterLocalStorageStrings.esm.js +1 -1
- package/dist/components/Root.esm.js +1 -1
- package/dist/plugin.esm.js +1 -1
- package/package.json +19 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @spotify/backstage-plugin-rbac
|
|
2
2
|
|
|
3
|
+
## 0.8.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Adding support for experimental features.
|
|
8
|
+
- Updated dependency `backstage` to `1.49.0`.
|
|
9
|
+
- Updated package to be compatible with zod versions 3 and 4.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @spotify/backstage-plugin-core@0.8.16
|
|
13
|
+
- @spotify/backstage-plugin-rbac-common@0.6.15
|
|
14
|
+
|
|
3
15
|
## 0.8.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/config.d.ts
CHANGED
|
@@ -35,6 +35,12 @@ export interface Config {
|
|
|
35
35
|
* @visibility backend
|
|
36
36
|
*/
|
|
37
37
|
fallbackPolicy?: Policy;
|
|
38
|
+
/**
|
|
39
|
+
* A list of experimental feature flags enabled for the RBAC backend.
|
|
40
|
+
* Include 'rbac-actions' to enable RBAC action registration.
|
|
41
|
+
* @visibility backend
|
|
42
|
+
*/
|
|
43
|
+
experimentalFlags?: string[];
|
|
38
44
|
};
|
|
39
45
|
};
|
|
40
46
|
}
|
package/dist/alpha/pages.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{convertLegacyRouteRef as t,compatWrapper as e}from"@backstage/core-compat-api";import{PageBlueprint as m}from"@backstage/frontend-plugin-api";import{RiLock2Fill as a}from"@remixicon/react";import{rootRouteRef as p}from"../routes.esm.js";const i=m.make({params:{routeRef:t(p),icon:o(a,{}),title:"Role Based Access Control",path:"/rbac",loader:()=>import("../components/Root.esm.js").then(r=>e(o(r.RBACRoot,{})))}});export{i as rbacPage};
|
|
2
2
|
//# sourceMappingURL=pages.esm.js.map
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as l,Fragment as c,jsx as e}from"react/jsx-runtime";import{useRouteRef as s}from"@backstage/core-plugin-api";import{HeaderPage as p,Grid as o}from"@backstage/ui";import{RiLock2Fill as u}from"@remixicon/react";import{SpotifyLicenseBanner as d}from"@spotify/backstage-plugin-core";import{rootRouteRef as f}from"../../routes.esm.js";import{Header as g}from"./Header.esm.js";import{useShowHeader as b}from"./ShowHeaderContext.esm.js";function y({children:r,pageTitle:i,primaryAction:t,pages:n}){const m=b(),a=s(f)();return l(c,{children:[e(d,{backend:"rbac",invalidLicenseMessage:"Your existing policy will continue to apply, but you will be unable to make any changes until you enter a valid license."}),m&&e(g,{title:"Role Based Access Control",titleLink:a,icon:e(u,{size:"1rem"})}),e(p,{title:i,customActions:t,breadcrumbs:n}),e(o.Root,{columns:"1",mx:"5",children:e(o.Item,{children:r})})]})}export{y as PageWrapper};
|
|
2
2
|
//# sourceMappingURL=PageWrapper.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{createContext as n,useContext as i}from"react";const e=n(!1);function d({showHeader:r,children:o}){return t(e.Provider,{value:r,children:o})}function u(){return i(e)}export{d as ShowHeaderProvider,u as useShowHeader};
|
|
2
|
+
//# sourceMappingURL=ShowHeaderContext.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useMemo as p,useEffect as u}from"react";import m from"react-use/lib/useLocalStorage";import{z as l}from"zod";const g=l.array(l.string()),S=(a,i,c)=>{const[n,t]=m(`@spotify/backstage-plugin-rbac:policyTesterForm:${a}`,[],{raw:!1,serializer:e=>JSON.stringify(e),deserializer:e=>{let s;try{s=JSON.parse(e)}catch(f){return console.error("Failed to parse json",f),[]}const r=g.safeParse(s);return r.success?r.data:(console.error(`Stored value for ${a} has the wrong shape`,r.error),[])}}),o=p(()=>n??[],[n]);return u(()=>{const e=new Set(i),s=o.some(r=>!e.has(r));!c&&s&&t(o.filter(r=>e.has(r)))},[i,o,t,c]),[o,t]};export{S as usePolicyTesterLocalStorageStrings};
|
|
1
|
+
import{useMemo as p,useEffect as u}from"react";import m from"react-use/lib/useLocalStorage";import{z as l}from"zod/v3";const g=l.array(l.string()),S=(a,i,c)=>{const[n,t]=m(`@spotify/backstage-plugin-rbac:policyTesterForm:${a}`,[],{raw:!1,serializer:e=>JSON.stringify(e),deserializer:e=>{let s;try{s=JSON.parse(e)}catch(f){return console.error("Failed to parse json",f),[]}const r=g.safeParse(s);return r.success?r.data:(console.error(`Stored value for ${a} has the wrong shape`,r.error),[])}}),o=p(()=>n??[],[n]);return u(()=>{const e=new Set(i),s=o.some(r=>!e.has(r));!c&&s&&t(o.filter(r=>e.has(r)))},[i,o,t,c]),[o,t]};export{S as usePolicyTesterLocalStorageStrings};
|
|
2
2
|
//# sourceMappingURL=usePolicyTesterLocalStorageStrings.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as m}from"react/jsx-runtime";import{Progress as n}from"@backstage/core-components";import{useApp as s}from"@backstage/core-plugin-api";import{Routes as p,Route as r}from"react-router-dom";import{Authorized as d}from"./Auth/Authorized.esm.js";import{HomePage as a}from"./Home/HomePage.esm.js";import{ShowHeaderProvider as l}from"./Layout/ShowHeaderContext.esm.js";import{MemberOptionsProvider as h}from"./Members/MemberOptionsProvider.esm.js";import{PermissionMetadataProvider as f}from"./Permissions/PermissionsMetadataContext.esm.js";import{PoliciesProvider as P}from"./Policies/PoliciesProvider.esm.js";import{PolicyOptionsPage as c}from"./Policy/PolicyOptionsPage.esm.js";import{PolicyPage as v}from"./Policy/PolicyPage.esm.js";import{RolePage as u}from"./Role/RolePage.esm.js";function g({showHeader:e}){const i=s(),{NotFoundErrorPage:t}=i.getComponents();return o(l,{showHeader:e??!1,children:o(d,{loading:o(n,{}),unauthorized:o(t,{}),children:o(P,{children:o(f,{children:o(h,{children:m(p,{children:[o(r,{element:o(a,{}),path:"/"}),o(r,{element:o(v,{}),path:"/versions/:versionId"}),o(r,{element:o(c,{}),path:"/versions/:versionId/options"}),o(r,{element:o(u,{}),path:"/versions/:versionId/roles/:roleId"})]})})})})})})}export{g as RBACRoot};
|
|
2
2
|
//# sourceMappingURL=Root.esm.js.map
|
package/dist/plugin.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createPlugin as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{createPlugin as i,createApiFactory as p,fetchApiRef as n,discoveryApiRef as a,createRoutableExtension as m,createComponentExtension as c}from"@backstage/core-plugin-api";import{rbacApiRef as R,RBACApi as A}from"./api.esm.js";import{rootRouteRef as t}from"./routes.esm.js";const o=i({id:"rbac",routes:{root:t},apis:[p({api:R,deps:{fetchApi:n,discoveryApi:a},factory(e){return new A(e)}})]}),f=o.provide(m({name:"RBACRoot",component:()=>import("./components/Root.esm.js").then(e=>()=>r(e.RBACRoot,{showHeader:!0})),mountPoint:t})),d=o.provide(c({name:"RBACSidebarItem",component:{lazy:()=>import("./components/RBACSidebarItem.esm.js").then(e=>e.RBACSidebarItem)}}));export{f as RBACRoot,d as RBACSidebarItem,o as rbacPlugin};
|
|
2
2
|
//# sourceMappingURL=plugin.esm.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotify/backstage-plugin-rbac",
|
|
3
3
|
"description": "Control access to actions and data in Backstage with ease.",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.6",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://backstage.spotify.com",
|
|
7
7
|
"main": "./dist/index.esm.js",
|
|
@@ -56,24 +56,24 @@
|
|
|
56
56
|
"a11y": "yarn dlx @lhci/cli@0.15.x --config ./.lighthouserc.js autorun"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@backstage/catalog-model": "^1.7.
|
|
60
|
-
"@backstage/core-compat-api": "^0.5.
|
|
61
|
-
"@backstage/core-components": "^0.18.
|
|
62
|
-
"@backstage/core-plugin-api": "^1.12.
|
|
59
|
+
"@backstage/catalog-model": "^1.7.7",
|
|
60
|
+
"@backstage/core-compat-api": "^0.5.9",
|
|
61
|
+
"@backstage/core-components": "^0.18.8",
|
|
62
|
+
"@backstage/core-plugin-api": "^1.12.4",
|
|
63
63
|
"@backstage/errors": "^1.2.7",
|
|
64
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
65
|
-
"@backstage/plugin-catalog-react": "^2.
|
|
66
|
-
"@backstage/plugin-permission-common": "^0.9.
|
|
67
|
-
"@backstage/plugin-permission-react": "^0.4.
|
|
64
|
+
"@backstage/frontend-plugin-api": "^0.15.0",
|
|
65
|
+
"@backstage/plugin-catalog-react": "^2.1.0",
|
|
66
|
+
"@backstage/plugin-permission-common": "^0.9.7",
|
|
67
|
+
"@backstage/plugin-permission-react": "^0.4.41",
|
|
68
68
|
"@backstage/theme": "^0.7.2",
|
|
69
69
|
"@backstage/types": "^1.2.2",
|
|
70
|
-
"@backstage/ui": "^0.
|
|
70
|
+
"@backstage/ui": "^0.13.0",
|
|
71
71
|
"@material-ui/core": "^4.12.2",
|
|
72
72
|
"@material-ui/icons": "^4.9.1",
|
|
73
73
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
74
74
|
"@remixicon/react": "^4.6.0",
|
|
75
|
-
"@spotify/backstage-plugin-core": "^0.8.
|
|
76
|
-
"@spotify/backstage-plugin-rbac-common": "^0.6.
|
|
75
|
+
"@spotify/backstage-plugin-core": "^0.8.16",
|
|
76
|
+
"@spotify/backstage-plugin-rbac-common": "^0.6.15",
|
|
77
77
|
"ajv": "^8.11.2",
|
|
78
78
|
"file-saver": "^2.0.5",
|
|
79
79
|
"js-yaml": "^4.1.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"react-use": "^17.2.4",
|
|
85
85
|
"react-virtualized": "^9.22.5",
|
|
86
86
|
"uuid": "^11.0.0",
|
|
87
|
-
"zod": "^3.
|
|
87
|
+
"zod": "^3.25.76 || ^4.0.0",
|
|
88
88
|
"zod-to-json-schema": "^3.20.2"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
@@ -93,13 +93,14 @@
|
|
|
93
93
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@backstage/cli": "^0.
|
|
97
|
-
"@backstage/core-app-api": "^1.19.
|
|
98
|
-
"@backstage/dev-utils": "^1.1.
|
|
96
|
+
"@backstage/cli": "^0.36.0",
|
|
97
|
+
"@backstage/core-app-api": "^1.19.6",
|
|
98
|
+
"@backstage/dev-utils": "^1.1.21",
|
|
99
99
|
"@backstage/e2e-test-utils": "^0.1.2",
|
|
100
|
-
"@backstage/frontend-test-utils": "^0.5.
|
|
101
|
-
"@backstage/test-utils": "^1.7.
|
|
100
|
+
"@backstage/frontend-test-utils": "^0.5.1",
|
|
101
|
+
"@backstage/test-utils": "^1.7.16",
|
|
102
102
|
"@playwright/test": "^1.32.3",
|
|
103
|
+
"@sp4b-dev/e2e-test-utils": "^0.0.0",
|
|
103
104
|
"@sp4b-dev/test-utils": "^0.0.13",
|
|
104
105
|
"@testing-library/jest-dom": "^6.0.0",
|
|
105
106
|
"@testing-library/react": "^14.0.0",
|