@adobe/helix-config 4.5.0 → 4.5.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 +7 -0
- package/package.json +4 -4
- package/src/config-view.js +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [4.5.1](https://github.com/adobe/helix-config/compare/v4.5.0...v4.5.1) (2024-09-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* also respect org-tokens (regression) ([#184](https://github.com/adobe/helix-config/issues/184)) ([2ae41fa](https://github.com/adobe/helix-config/commit/2ae41fa518a32a5fc674bbc85796e21843fb3c3c))
|
|
7
|
+
|
|
1
8
|
# [4.5.0](https://github.com/adobe/helix-config/compare/v4.4.0...v4.5.0) (2024-09-05)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "Helix Config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"reporter-options": "configFile=.mocha-multi.json"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@adobe/eslint-config-helix": "2.0.
|
|
38
|
+
"@adobe/eslint-config-helix": "2.0.7",
|
|
39
39
|
"@semantic-release/changelog": "6.0.3",
|
|
40
40
|
"@semantic-release/git": "10.0.1",
|
|
41
41
|
"@semantic-release/npm": "12.0.1",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"eslint": "8.57.0",
|
|
44
44
|
"husky": "9.1.5",
|
|
45
45
|
"junit-report-builder": "5.0.0",
|
|
46
|
-
"lint-staged": "15.2.
|
|
46
|
+
"lint-staged": "15.2.10",
|
|
47
47
|
"mocha": "10.7.3",
|
|
48
48
|
"mocha-multi-reporters": "1.5.1",
|
|
49
49
|
"mocha-suppress-logs": "0.5.1",
|
|
@@ -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.8",
|
|
60
60
|
"@adobe/helix-shared-utils": "3.0.2"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/src/config-view.js
CHANGED
|
@@ -109,8 +109,9 @@ async function getGlobalTokenHash(ctx, rso) {
|
|
|
109
109
|
/**
|
|
110
110
|
* Returns the normalized access configuration for the give partition.
|
|
111
111
|
*/
|
|
112
|
-
export async function getAccessConfig(ctx, config, partition, rso) {
|
|
113
|
-
const { access
|
|
112
|
+
export async function getAccessConfig(ctx, config, orgConfig, partition, rso) {
|
|
113
|
+
const { access } = config;
|
|
114
|
+
const tokens = { ...orgConfig?.tokens || {}, ...config.tokens };
|
|
114
115
|
const pAccess = access[partition] ?? {};
|
|
115
116
|
const apiKeyId = toArray(pAccess.apiKeyId ?? access.site?.apiKeyId);
|
|
116
117
|
const allow = toArray(pAccess.allow ?? access.site?.allow);
|
|
@@ -438,8 +439,8 @@ export async function getConfigResponse(ctx, opts) {
|
|
|
438
439
|
// normalize access config
|
|
439
440
|
const { admin = {} } = config.access;
|
|
440
441
|
config.access = {
|
|
441
|
-
preview: await getAccessConfig(ctx, config, 'preview', rso),
|
|
442
|
-
live: await getAccessConfig(ctx, config, 'live', rso),
|
|
442
|
+
preview: await getAccessConfig(ctx, config, orgConfig, 'preview', rso),
|
|
443
|
+
live: await getAccessConfig(ctx, config, orgConfig, 'live', rso),
|
|
443
444
|
// access.require.repository ?
|
|
444
445
|
};
|
|
445
446
|
if (opts.scope === SCOPE_ADMIN || opts.scope === SCOPE_RAW) {
|