@clxmedia/xperience-rights-client 1.1.1 → 1.1.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/dist/client.js +9 -5
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -157,20 +157,24 @@ class XperienceRightsClient {
|
|
|
157
157
|
qualifier = 0;
|
|
158
158
|
}
|
|
159
159
|
return strategies.some((strategy) => {
|
|
160
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
161
|
+
if (!strategy.enabled) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
160
164
|
if (strategy.type === 'group') {
|
|
161
|
-
return strategy.groups.some((group) => XperienceRightsClient.isGroupMember(data, group, qualifier));
|
|
165
|
+
return (_a = strategy.groups) === null || _a === void 0 ? void 0 : _a.some((group) => XperienceRightsClient.isGroupMember(data, group, qualifier));
|
|
162
166
|
}
|
|
163
167
|
if (strategy.type === 'user') {
|
|
164
|
-
return strategy.users.includes(data.email);
|
|
168
|
+
return ((_b = strategy.users) === null || _b === void 0 ? void 0 : _b.includes(data.email)) || false;
|
|
165
169
|
}
|
|
166
170
|
if (strategy.type === 'company') {
|
|
167
|
-
return strategy.master_ids.includes(qualifier);
|
|
171
|
+
return ((_c = strategy.master_ids) === null || _c === void 0 ? void 0 : _c.includes(qualifier)) || false;
|
|
168
172
|
}
|
|
169
173
|
if (strategy.type === 'company_user') {
|
|
170
|
-
return strategy.master_ids.includes(qualifier) && strategy.users.includes(data.email);
|
|
174
|
+
return ((_d = strategy.master_ids) === null || _d === void 0 ? void 0 : _d.includes(qualifier)) && ((_e = strategy.users) === null || _e === void 0 ? void 0 : _e.includes(data.email));
|
|
171
175
|
}
|
|
172
176
|
if (strategy.type === 'company_group') {
|
|
173
|
-
return strategy.master_ids.includes(qualifier) && strategy.groups.some((group) => XperienceRightsClient.isGroupMember(data, group, qualifier));
|
|
177
|
+
return ((_f = strategy.master_ids) === null || _f === void 0 ? void 0 : _f.includes(qualifier)) && ((_g = strategy.groups) === null || _g === void 0 ? void 0 : _g.some((group) => XperienceRightsClient.isGroupMember(data, group, qualifier)));
|
|
174
178
|
}
|
|
175
179
|
return false;
|
|
176
180
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clxmedia/xperience-rights-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "CLXperience Rights Client",
|
|
5
5
|
"author": "Brandon Thompson <brandont@clxmedia.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"bugs": "https://github.com/adsupnow/xperience-library/xperience-rights-client",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@clxmedia/types": "1.0.
|
|
35
|
+
"@clxmedia/types": "1.0.161"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.11",
|