@adobe/helix-config 4.3.1 → 4.3.3
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 +14 -0
- package/package.json +4 -4
- package/src/config-legacy.js +7 -1
- package/src/config-view.js +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [4.3.3](https://github.com/adobe/helix-config/compare/v4.3.2...v4.3.3) (2024-09-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* respect access.allow correctly ([#179](https://github.com/adobe/helix-config/issues/179)) ([398064e](https://github.com/adobe/helix-config/commit/398064e42b338b31d1717aed2f05a47ceae74c7c))
|
|
7
|
+
|
|
8
|
+
## [4.3.2](https://github.com/adobe/helix-config/compare/v4.3.1...v4.3.2) (2024-08-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/helix-shared-config to v10.6.7 ([5fc70b4](https://github.com/adobe/helix-config/commit/5fc70b4e4e9f42607455a4c2bfc12e1ff0d10284))
|
|
14
|
+
|
|
1
15
|
## [4.3.1](https://github.com/adobe/helix-config/compare/v4.3.0...v4.3.1) (2024-08-22)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.3",
|
|
4
4
|
"description": "Helix Config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"@semantic-release/npm": "12.0.1",
|
|
42
42
|
"c8": "10.1.2",
|
|
43
43
|
"eslint": "8.57.0",
|
|
44
|
-
"husky": "9.1.
|
|
44
|
+
"husky": "9.1.5",
|
|
45
45
|
"junit-report-builder": "5.0.0",
|
|
46
46
|
"lint-staged": "15.2.9",
|
|
47
47
|
"mocha": "10.7.3",
|
|
48
48
|
"mocha-multi-reporters": "1.5.1",
|
|
49
49
|
"mocha-suppress-logs": "0.5.1",
|
|
50
|
-
"nock": "13.5.
|
|
50
|
+
"nock": "13.5.5",
|
|
51
51
|
"semantic-release": "24.1.0"
|
|
52
52
|
},
|
|
53
53
|
"lint-staged": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@adobe/fetch": "4.1.8",
|
|
59
|
-
"@adobe/helix-shared-config": "10.6.
|
|
59
|
+
"@adobe/helix-shared-config": "10.6.7",
|
|
60
60
|
"@adobe/helix-shared-utils": "3.0.2"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/src/config-legacy.js
CHANGED
|
@@ -158,7 +158,13 @@ export async function resolveLegacyConfig(ctx, rso, scope) {
|
|
|
158
158
|
const configAllLive = await fetchConfigAll(ctx, config.content.contentBusId, 'live');
|
|
159
159
|
const { access, admin } = configAllPreview?.config?.data || {};
|
|
160
160
|
if (access) {
|
|
161
|
-
config.access =
|
|
161
|
+
config.access = {
|
|
162
|
+
preview: access.preview,
|
|
163
|
+
live: access.live,
|
|
164
|
+
};
|
|
165
|
+
delete access.preview;
|
|
166
|
+
delete access.live;
|
|
167
|
+
config.access.site = access;
|
|
162
168
|
}
|
|
163
169
|
if (admin) {
|
|
164
170
|
if (!config.access) {
|
package/src/config-view.js
CHANGED
|
@@ -112,10 +112,11 @@ async function getGlobalTokenHash(ctx, rso) {
|
|
|
112
112
|
export async function getAccessConfig(ctx, config, partition, rso) {
|
|
113
113
|
const { access, tokens = {} } = config;
|
|
114
114
|
const pAccess = access[partition] ?? {};
|
|
115
|
-
const apiKeyId = toArray(pAccess.apiKeyId ?? access.site?.apiKeyId
|
|
116
|
-
const allow = toArray(pAccess.allow ?? access.allow);
|
|
115
|
+
const apiKeyId = toArray(pAccess.apiKeyId ?? access.site?.apiKeyId);
|
|
116
|
+
const allow = toArray(pAccess.allow ?? access.site?.allow);
|
|
117
117
|
const cfg = {
|
|
118
118
|
apiKeyId,
|
|
119
|
+
allow,
|
|
119
120
|
tokenHash: apiKeyId
|
|
120
121
|
// token ids are always stored in base64url format, but legacy apiKeyIds are not
|
|
121
122
|
.map((jti) => jti.replaceAll('/', '_').replaceAll('+', '-'))
|
|
@@ -468,6 +469,8 @@ export async function getConfigResponse(ctx, opts) {
|
|
|
468
469
|
} else {
|
|
469
470
|
delete config.access?.preview?.apiKeyId;
|
|
470
471
|
delete config.access?.live?.apiKeyId;
|
|
472
|
+
delete config.access?.preview?.allow;
|
|
473
|
+
delete config.access?.live?.allow;
|
|
471
474
|
}
|
|
472
475
|
|
|
473
476
|
if (opts.scope === SCOPE_ADMIN) {
|