@adobe/spacecat-shared-data-access 1.49.5 → 1.49.6
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 +1 -1
- package/src/models/configuration.js +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.49.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.5...@adobe/spacecat-shared-data-access-v1.49.6) (2024-11-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handle missing 'sites' and 'orgs' in enabled/disabled configuraions safely ([#424](https://github.com/adobe/spacecat-shared/issues/424)) ([5a1468f](https://github.com/adobe/spacecat-shared/commit/5a1468f92fb2b0b288cebb44576dea3f4948b462)), closes [/github.com/adobe/spacecat-shared/blob/main/packages/spacecat-shared-data-access/src/models/configuration.js#L39-L45](https://github.com//github.com/adobe/spacecat-shared/blob/main/packages/spacecat-shared-data-access/src/models/configuration.js/issues/L39-L45)
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-data-access-v1.49.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.49.4...@adobe/spacecat-shared-data-access-v1.49.5) (2024-11-07)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -37,12 +37,15 @@ const Configuration = (data = {}) => {
|
|
|
37
37
|
const orgId = site.getOrganizationId();
|
|
38
38
|
|
|
39
39
|
if (handler.enabled) {
|
|
40
|
-
|
|
40
|
+
const sites = handler.enabled.sites || [];
|
|
41
|
+
const orgs = handler.enabled.orgs || [];
|
|
42
|
+
return sites.includes(siteId) || orgs.includes(orgId);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
if (handler.disabled) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
const sites = handler.disabled.sites || [];
|
|
47
|
+
const orgs = handler.disabled.orgs || [];
|
|
48
|
+
return !(sites.includes(siteId) || orgs.includes(orgId));
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
return handler.enabledByDefault;
|