@adobe/spacecat-shared-data-access 2.13.2 → 2.13.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 CHANGED
@@ -1,3 +1,10 @@
1
+ # [@adobe/spacecat-shared-data-access-v2.13.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.13.2...@adobe/spacecat-shared-data-access-v2.13.3) (2025-04-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * configuration shouldn't check for enabled if audit is enabledByDefault ([#675](https://github.com/adobe/spacecat-shared/issues/675)) ([0d8538a](https://github.com/adobe/spacecat-shared/commit/0d8538ac967e2a69a08ebc462530985780584f0e))
7
+
1
8
  # [@adobe/spacecat-shared-data-access-v2.13.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.13.1...@adobe/spacecat-shared-data-access-v2.13.2) (2025-04-01)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "2.13.2",
3
+ "version": "2.13.3",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -80,19 +80,24 @@ class Configuration extends BaseModel {
80
80
  const siteId = site.getId();
81
81
  const orgId = site.getOrganizationId();
82
82
 
83
+ if (handler.disabled) {
84
+ const sites = handler.disabled.sites || [];
85
+ const orgs = handler.disabled.orgs || [];
86
+ if (sites.includes(siteId) || orgs.includes(orgId)) {
87
+ return false;
88
+ }
89
+ }
90
+
91
+ if (handler.enabledByDefault) {
92
+ return true;
93
+ }
83
94
  if (handler.enabled) {
84
95
  const sites = handler.enabled.sites || [];
85
96
  const orgs = handler.enabled.orgs || [];
86
97
  return sites.includes(siteId) || orgs.includes(orgId);
87
98
  }
88
99
 
89
- if (handler.disabled) {
90
- const sites = handler.disabled.sites || [];
91
- const orgs = handler.disabled.orgs || [];
92
- return !(sites.includes(siteId) || orgs.includes(orgId));
93
- }
94
-
95
- return handler.enabledByDefault;
100
+ return false;
96
101
  }
97
102
 
98
103
  isHandlerEnabledForOrg(type, org) {
@@ -101,15 +106,19 @@ class Configuration extends BaseModel {
101
106
 
102
107
  const orgId = org.getId();
103
108
 
104
- if (handler.enabled) {
105
- return handler.enabled.orgs?.includes(orgId);
109
+ if (handler.disabled && handler.disabled.orgs?.includes(orgId)) {
110
+ return false;
106
111
  }
107
112
 
108
- if (handler.disabled) {
109
- return !handler.disabled.orgs?.includes(orgId);
113
+ if (handler.enabledByDefault) {
114
+ return true;
115
+ }
116
+
117
+ if (handler.enabled) {
118
+ return handler.enabled.orgs?.includes(orgId);
110
119
  }
111
120
 
112
- return handler.enabledByDefault;
121
+ return false;
113
122
  }
114
123
 
115
124
  #updatedHandler(type, entityId, enabled, entityKey) {