@backstage/plugin-catalog-backend 0.21.0 → 0.21.1
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 +10 -0
- package/dist/index.cjs.js +6 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 0.21.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4f5bde47e9: Add support for permissions to the DefaultCatalogCollator.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/search-common@0.2.2
|
|
10
|
+
- @backstage/backend-common@0.10.5
|
|
11
|
+
- @backstage/plugin-permission-node@0.4.1
|
|
12
|
+
|
|
3
13
|
## 0.21.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -21,6 +21,7 @@ var graphql = require('@octokit/graphql');
|
|
|
21
21
|
var backendCommon = require('@backstage/backend-common');
|
|
22
22
|
var yaml = require('yaml');
|
|
23
23
|
var catalogClient = require('@backstage/catalog-client');
|
|
24
|
+
var pluginCatalogCommon = require('@backstage/plugin-catalog-common');
|
|
24
25
|
var crypto = require('crypto');
|
|
25
26
|
var express = require('express');
|
|
26
27
|
var Router = require('express-promise-router');
|
|
@@ -29,7 +30,6 @@ var uuid = require('uuid');
|
|
|
29
30
|
var luxon = require('luxon');
|
|
30
31
|
var promClient = require('prom-client');
|
|
31
32
|
var stableStringify = require('fast-json-stable-stringify');
|
|
32
|
-
var pluginCatalogCommon = require('@backstage/plugin-catalog-common');
|
|
33
33
|
var pluginPermissionCommon = require('@backstage/plugin-permission-common');
|
|
34
34
|
var pluginPermissionNode = require('@backstage/plugin-permission-node');
|
|
35
35
|
|
|
@@ -1930,6 +1930,7 @@ function withLocations(baseUrl, org, entity) {
|
|
|
1930
1930
|
class DefaultCatalogCollator {
|
|
1931
1931
|
constructor(options) {
|
|
1932
1932
|
this.type = "software-catalog";
|
|
1933
|
+
this.visibilityPermission = pluginCatalogCommon.catalogEntityReadPermission;
|
|
1933
1934
|
const { discovery, locationTemplate, filter, catalogClient: catalogClient$1, tokenManager } = options;
|
|
1934
1935
|
this.discovery = discovery;
|
|
1935
1936
|
this.locationTemplate = locationTemplate || "/catalog/:namespace/:kind/:name";
|
|
@@ -1984,7 +1985,10 @@ class DefaultCatalogCollator {
|
|
|
1984
1985
|
namespace: entity.metadata.namespace || "default",
|
|
1985
1986
|
kind: entity.kind,
|
|
1986
1987
|
lifecycle: ((_d = entity.spec) == null ? void 0 : _d.lifecycle) || "",
|
|
1987
|
-
owner: ((_e = entity.spec) == null ? void 0 : _e.owner) || ""
|
|
1988
|
+
owner: ((_e = entity.spec) == null ? void 0 : _e.owner) || "",
|
|
1989
|
+
authorization: {
|
|
1990
|
+
resourceRef: catalogModel.stringifyEntityRef(entity)
|
|
1991
|
+
}
|
|
1988
1992
|
};
|
|
1989
1993
|
});
|
|
1990
1994
|
}
|