@backstage/plugin-permission-node 0.7.14-next.3 → 0.7.15
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 +22 -0
- package/alpha/package.json +1 -1
- package/dist/index.d.ts +4 -5
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @backstage/plugin-permission-node
|
|
2
2
|
|
|
3
|
+
## 0.7.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/plugin-auth-node@0.3.1
|
|
9
|
+
- @backstage/backend-plugin-api@0.6.4
|
|
10
|
+
- @backstage/backend-common@0.19.6
|
|
11
|
+
|
|
12
|
+
## 0.7.14
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- a8a614ba0d07: Minor `package.json` update.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @backstage/backend-common@0.19.5
|
|
19
|
+
- @backstage/plugin-auth-node@0.3.0
|
|
20
|
+
- @backstage/config@1.1.0
|
|
21
|
+
- @backstage/errors@1.2.2
|
|
22
|
+
- @backstage/plugin-permission-common@0.7.8
|
|
23
|
+
- @backstage/backend-plugin-api@0.6.3
|
|
24
|
+
|
|
3
25
|
## 0.7.14-next.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
|
|
2
1
|
import { PermissionCriteria, AllOfCriteria, AnyOfCriteria, NotCriteria, PermissionRuleParams, PermissionCondition, ResourcePermission, ConditionalPolicyDecision, IdentifiedPermissionMessage, DefinitivePolicyDecision, Permission, PolicyDecision, PermissionEvaluator, QueryPermissionRequest, EvaluatorRequestOptions, AuthorizePermissionRequest, AuthorizePermissionResponse } from '@backstage/plugin-permission-common';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import express from 'express';
|
|
@@ -134,13 +133,13 @@ type Conditions<TRules extends Record<string, PermissionRule<any, any, any>>> =
|
|
|
134
133
|
*
|
|
135
134
|
* @public
|
|
136
135
|
*/
|
|
137
|
-
declare const createConditionExports: <TResourceType extends string, TResource, TRules extends Record<string, PermissionRule<TResource, any, TResourceType
|
|
136
|
+
declare const createConditionExports: <TResourceType extends string, TResource, TRules extends Record<string, PermissionRule<TResource, any, TResourceType>>>(options: {
|
|
138
137
|
pluginId: string;
|
|
139
138
|
resourceType: TResourceType;
|
|
140
139
|
rules: TRules;
|
|
141
140
|
}) => {
|
|
142
141
|
conditions: Conditions<TRules>;
|
|
143
|
-
createConditionalDecision: (permission: ResourcePermission<TResourceType>, conditions: PermissionCriteria<PermissionCondition<TResourceType
|
|
142
|
+
createConditionalDecision: (permission: ResourcePermission<TResourceType>, conditions: PermissionCriteria<PermissionCondition<TResourceType>>) => ConditionalPolicyDecision;
|
|
144
143
|
};
|
|
145
144
|
|
|
146
145
|
/**
|
|
@@ -160,7 +159,7 @@ type ConditionTransformer<TQuery> = (conditions: PermissionCriteria<PermissionCo
|
|
|
160
159
|
*
|
|
161
160
|
* @public
|
|
162
161
|
*/
|
|
163
|
-
declare const createConditionTransformer: <TQuery, TRules extends PermissionRule<any, TQuery, string
|
|
162
|
+
declare const createConditionTransformer: <TQuery, TRules extends PermissionRule<any, TQuery, string>[]>(permissionRules: [...TRules]) => ConditionTransformer<TQuery>;
|
|
164
163
|
|
|
165
164
|
/**
|
|
166
165
|
* A request to load the referenced resource and apply conditions in order to
|
|
@@ -224,7 +223,7 @@ type MetadataResponse = {
|
|
|
224
223
|
*
|
|
225
224
|
* @public
|
|
226
225
|
*/
|
|
227
|
-
declare const createConditionAuthorizer: <TResource, TQuery>(rules: PermissionRule<TResource, TQuery, string
|
|
226
|
+
declare const createConditionAuthorizer: <TResource, TQuery>(rules: PermissionRule<TResource, TQuery, string>[]) => (decision: PolicyDecision, resource: TResource | undefined) => boolean;
|
|
228
227
|
/**
|
|
229
228
|
* Options for creating a permission integration router specific
|
|
230
229
|
* for a particular resource type.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-permission-node",
|
|
3
3
|
"description": "Common permission and authorization utilities for backend plugins",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.15",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"start": "backstage-cli package start"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@backstage/backend-common": "^0.19.
|
|
48
|
-
"@backstage/backend-plugin-api": "^0.6.
|
|
49
|
-
"@backstage/config": "^1.1.0
|
|
50
|
-
"@backstage/errors": "^1.2.2
|
|
51
|
-
"@backstage/plugin-auth-node": "^0.3.
|
|
52
|
-
"@backstage/plugin-permission-common": "^0.7.8
|
|
47
|
+
"@backstage/backend-common": "^0.19.6",
|
|
48
|
+
"@backstage/backend-plugin-api": "^0.6.4",
|
|
49
|
+
"@backstage/config": "^1.1.0",
|
|
50
|
+
"@backstage/errors": "^1.2.2",
|
|
51
|
+
"@backstage/plugin-auth-node": "^0.3.1",
|
|
52
|
+
"@backstage/plugin-permission-common": "^0.7.8",
|
|
53
53
|
"@types/express": "^4.17.6",
|
|
54
54
|
"express": "^4.17.1",
|
|
55
55
|
"express-promise-router": "^4.1.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"zod-to-json-schema": "^3.20.4"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@backstage/backend-test-utils": "^0.2.
|
|
61
|
-
"@backstage/cli": "^0.22.13
|
|
60
|
+
"@backstage/backend-test-utils": "^0.2.5",
|
|
61
|
+
"@backstage/cli": "^0.22.13",
|
|
62
62
|
"@types/supertest": "^2.0.8",
|
|
63
63
|
"msw": "^1.0.0",
|
|
64
64
|
"supertest": "^6.1.3"
|