@backstage/plugin-catalog-backend 1.1.0-next.3 → 1.1.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 +63 -0
- package/alpha/package.json +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8012ac46a0: **BREAKING (alpha api):** Replace `createCatalogPolicyDecision` export with `createCatalogConditionalDecision`, which accepts a permission parameter of type `ResourcePermission<'catalog-entity'>` along with conditions. The permission passed is expected to be the handled permission in `PermissionPolicy#handle`, whose type must first be narrowed using methods like `isPermission` and `isResourcePermission`:
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
class TestPermissionPolicy implements PermissionPolicy {
|
|
11
|
+
async handle(
|
|
12
|
+
request: PolicyQuery<Permission>,
|
|
13
|
+
_user?: BackstageIdentityResponse,
|
|
14
|
+
): Promise<PolicyDecision> {
|
|
15
|
+
if (
|
|
16
|
+
// Narrow type of `request.permission` to `ResourcePermission<'catalog-entity'>
|
|
17
|
+
isResourcePermission(request.permission, RESOURCE_TYPE_CATALOG_ENTITY)
|
|
18
|
+
) {
|
|
19
|
+
return createCatalogConditionalDecision(
|
|
20
|
+
request.permission,
|
|
21
|
+
catalogConditions.isEntityOwner(
|
|
22
|
+
_user?.identity.ownershipEntityRefs ?? [],
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
result: AuthorizeResult.ALLOW,
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- 8012ac46a0: **BREAKING:** Mark CatalogBuilder#addPermissionRules as @alpha.
|
|
33
|
+
- fb02d2d94d: export `locationSpecToLocationEntity`
|
|
34
|
+
- bf82edf4c9: Added `/validate-entity` endpoint
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- ada4446733: Specify type of `visibilityPermission` property on collators and collator factories.
|
|
39
|
+
- 1691c6c5c2: Clarify that config locations that emit User and Group kinds now need to declare so in the `catalog.locations.[].rules`
|
|
40
|
+
- 8592cacfd3: Fixed an issue where sometimes entities would have stale relations "stuck" and
|
|
41
|
+
not getting removed as expected, after the other end of the relation had stopped
|
|
42
|
+
referring to them.
|
|
43
|
+
- 23646e51a5: Use new `PermissionEvaluator#authorizeConditional` method when retrieving permission conditions.
|
|
44
|
+
- 9fe24b0fc8: Adjust the error messages when entities fail validation, to clearly state what entity that failed it
|
|
45
|
+
- 48405ed232: Added `spec.profile.displayName` to search index for Group kinds
|
|
46
|
+
- 95408dbe99: Enable internal batching of very large deletions, to not run into SQL binding limits
|
|
47
|
+
- 8012ac46a0: Handle changes to @alpha permission-related types.
|
|
48
|
+
|
|
49
|
+
- All exported permission rules and conditions now have a `resourceType`.
|
|
50
|
+
- `createCatalogConditionalDecision` now expects supplied conditions to have the appropriate `resourceType`.
|
|
51
|
+
- `createCatalogPermissionRule` now expects `resourceType` as part of the supplied rule object.
|
|
52
|
+
- Introduce new `CatalogPermissionRule` convenience type.
|
|
53
|
+
|
|
54
|
+
- ffec894ed0: add gitlab to AnnotateScmSlugEntityProcessor
|
|
55
|
+
- Updated dependencies
|
|
56
|
+
- @backstage/integration@1.1.0
|
|
57
|
+
- @backstage/plugin-permission-common@0.6.0
|
|
58
|
+
- @backstage/plugin-permission-node@0.6.0
|
|
59
|
+
- @backstage/catalog-model@1.0.1
|
|
60
|
+
- @backstage/plugin-search-common@0.3.3
|
|
61
|
+
- @backstage/backend-common@0.13.2
|
|
62
|
+
- @backstage/plugin-catalog-common@1.0.1
|
|
63
|
+
- @backstage/catalog-client@1.0.1
|
|
64
|
+
- @backstage/plugin-scaffolder-common@1.0.1
|
|
65
|
+
|
|
3
66
|
## 1.1.0-next.3
|
|
4
67
|
|
|
5
68
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-backend",
|
|
3
3
|
"description": "The Backstage backend plugin that provides the Backstage catalog",
|
|
4
|
-
"version": "1.1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"clean": "backstage-cli package clean"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@backstage/backend-common": "^0.13.2
|
|
38
|
-
"@backstage/catalog-client": "^1.0.1
|
|
39
|
-
"@backstage/catalog-model": "^1.0.1
|
|
37
|
+
"@backstage/backend-common": "^0.13.2",
|
|
38
|
+
"@backstage/catalog-client": "^1.0.1",
|
|
39
|
+
"@backstage/catalog-model": "^1.0.1",
|
|
40
40
|
"@backstage/config": "^1.0.0",
|
|
41
41
|
"@backstage/errors": "^1.0.0",
|
|
42
|
-
"@backstage/integration": "^1.1.0
|
|
43
|
-
"@backstage/plugin-catalog-common": "^1.0.1
|
|
44
|
-
"@backstage/plugin-permission-common": "^0.6.0
|
|
45
|
-
"@backstage/plugin-permission-node": "^0.6.0
|
|
46
|
-
"@backstage/plugin-scaffolder-common": "^1.0.1
|
|
47
|
-
"@backstage/plugin-search-common": "^0.3.3
|
|
42
|
+
"@backstage/integration": "^1.1.0",
|
|
43
|
+
"@backstage/plugin-catalog-common": "^1.0.1",
|
|
44
|
+
"@backstage/plugin-permission-common": "^0.6.0",
|
|
45
|
+
"@backstage/plugin-permission-node": "^0.6.0",
|
|
46
|
+
"@backstage/plugin-scaffolder-common": "^1.0.1",
|
|
47
|
+
"@backstage/plugin-search-common": "^0.3.3",
|
|
48
48
|
"@backstage/types": "^1.0.0",
|
|
49
49
|
"@types/express": "^4.17.6",
|
|
50
50
|
"codeowners-utils": "^1.0.2",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"zod": "^3.11.6"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@backstage/backend-test-utils": "^0.1.23
|
|
72
|
-
"@backstage/cli": "^0.17.0
|
|
73
|
-
"@backstage/plugin-permission-common": "^0.6.0
|
|
74
|
-
"@backstage/plugin-search-backend-node": "0.6.0
|
|
71
|
+
"@backstage/backend-test-utils": "^0.1.23",
|
|
72
|
+
"@backstage/cli": "^0.17.0",
|
|
73
|
+
"@backstage/plugin-permission-common": "^0.6.0",
|
|
74
|
+
"@backstage/plugin-search-backend-node": "0.6.0",
|
|
75
75
|
"@types/core-js": "^2.5.4",
|
|
76
76
|
"@types/git-url-parse": "^9.0.0",
|
|
77
77
|
"@types/lodash": "^4.14.151",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"config.d.ts"
|
|
91
91
|
],
|
|
92
92
|
"configSchema": "config.d.ts",
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "e0e44c433319711c2fb8b175db411a621f7aaec2"
|
|
94
94
|
}
|