permission-node: refactor and split createPermissionIntegration

This refactor makes the createPermissionIntegration system much more
flexible by splitting it up into a few different helpers with different
responsibilities. This frees up plugin authors to connect together the
different parts of the permission integration in whatever way is
convenient for them, and makes the process of registering additional
permission rules a bit more explicit, by requiring them to be passed
in when constructing the systems for transforming or applying
conditions.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
Co-authored-by: Joon Park <joonp@spotify.com>
Co-authored-by: Tim Hansen <timbonicus@gmail.com>
This commit is contained in:
Mike Lewis
2021-11-19 13:43:59 +00:00
parent 70ce7c91e2
commit 3254303a96
15 changed files with 908 additions and 791 deletions
+1 -2
View File
@@ -8,7 +8,6 @@
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts"
},
"homepage": "https://backstage.io",
@@ -32,7 +31,7 @@
"dependencies": {
"@backstage/plugin-auth-backend": "^0.4.6",
"@backstage/plugin-permission-common": "^0.1.0",
"@types/express": "*",
"@types/express": "^4.17.6",
"express": "^4.17.1",
"zod": "^3.11.6"
},