@backstage/plugin-auth-backend 0.0.0-nightly-20220223022848 → 0.0.0-nightly-20220224022833
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 +7 -5
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20220224022833
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
|
|
22
22
|
### Patch Changes
|
|
23
23
|
|
|
24
|
+
- d64b8d3678: chore(deps): bump `minimatch` from 3.0.4 to 5.0.0
|
|
24
25
|
- 6e1cbc12a6: Updated according to the new `getEntityFacets` catalog API method
|
|
26
|
+
- 919cf2f836: Minor updates to match the new `targetRef` field of relations, and to stop consuming the `target` field
|
|
25
27
|
- Updated dependencies
|
|
26
|
-
- @backstage/backend-common@0.0.0-nightly-
|
|
27
|
-
- @backstage/catalog-model@0.0.0-nightly-
|
|
28
|
-
- @backstage/catalog-client@0.0.0-nightly-
|
|
29
|
-
- @backstage/plugin-auth-node@0.0.0-nightly-
|
|
28
|
+
- @backstage/backend-common@0.0.0-nightly-20220224022833
|
|
29
|
+
- @backstage/catalog-model@0.0.0-nightly-20220224022833
|
|
30
|
+
- @backstage/catalog-client@0.0.0-nightly-20220224022833
|
|
31
|
+
- @backstage/plugin-auth-node@0.0.0-nightly-20220224022833
|
|
30
32
|
|
|
31
33
|
## 0.10.2
|
|
32
34
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -607,10 +607,10 @@ class CatalogIdentityClient {
|
|
|
607
607
|
}
|
|
608
608
|
const memberOf = entities.flatMap((e) => {
|
|
609
609
|
var _a, _b;
|
|
610
|
-
return (_b = (_a = e.relations) == null ? void 0 : _a.filter((r) => r.type === catalogModel.RELATION_MEMBER_OF).map((r) => r.
|
|
610
|
+
return (_b = (_a = e.relations) == null ? void 0 : _a.filter((r) => r.type === catalogModel.RELATION_MEMBER_OF).map((r) => r.targetRef)) != null ? _b : [];
|
|
611
611
|
});
|
|
612
612
|
const newEntityRefs = [
|
|
613
|
-
...new Set(resolvedEntityRefs.
|
|
613
|
+
...new Set(resolvedEntityRefs.map(catalogModel.stringifyEntityRef).concat(memberOf))
|
|
614
614
|
];
|
|
615
615
|
logger == null ? void 0 : logger.debug(`Found catalog membership: ${newEntityRefs.join()}`);
|
|
616
616
|
return newEntityRefs;
|
|
@@ -620,7 +620,7 @@ class CatalogIdentityClient {
|
|
|
620
620
|
function getEntityClaims(entity) {
|
|
621
621
|
var _a, _b;
|
|
622
622
|
const userRef = catalogModel.stringifyEntityRef(entity);
|
|
623
|
-
const membershipRefs = (_b = (_a = entity.relations) == null ? void 0 : _a.filter((r) => r.type === catalogModel.RELATION_MEMBER_OF && r.
|
|
623
|
+
const membershipRefs = (_b = (_a = entity.relations) == null ? void 0 : _a.filter((r) => r.type === catalogModel.RELATION_MEMBER_OF && r.targetRef.startsWith("group:")).map((r) => r.targetRef)) != null ? _b : [];
|
|
624
624
|
return {
|
|
625
625
|
sub: userRef,
|
|
626
626
|
ent: [userRef, ...membershipRefs]
|