@autofleet/zehut 3.3.3-beta-357bd028.2 → 3.4.2
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/lib/user/ApiUser.js +10 -1
- package/package.json +9 -1
package/lib/user/ApiUser.js
CHANGED
|
@@ -139,7 +139,16 @@ class ApiUser {
|
|
|
139
139
|
if (this.privatePermissionsLegacy) {
|
|
140
140
|
return this.privatePermissionsLegacy;
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const cacheKey = (0, object_hash_1.default)({
|
|
143
|
+
id: this.id,
|
|
144
|
+
contextIds: this.contextIds,
|
|
145
|
+
legacy: true,
|
|
146
|
+
});
|
|
147
|
+
let data = userCache.get(cacheKey);
|
|
148
|
+
if (!data) {
|
|
149
|
+
({ data } = await services_1.IdentityNetwork.get(`/api/v1/users/${this.id}/authorization-payload-legacy`, { params: { contextIds: this.contextIds } }));
|
|
150
|
+
userCache.set(cacheKey, data);
|
|
151
|
+
}
|
|
143
152
|
this.privatePermissionsLegacy = data;
|
|
144
153
|
return this.privatePermissionsLegacy;
|
|
145
154
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autofleet/zehut",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "manage user's identity",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -48,6 +48,14 @@
|
|
|
48
48
|
"typescript": "^4.9.5",
|
|
49
49
|
"vitest": "^3.0.6"
|
|
50
50
|
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@autofleet/shtinker": ">=1.2.0"
|
|
53
|
+
},
|
|
54
|
+
"peerDependenciesMeta": {
|
|
55
|
+
"@autofleet/shtinker": {
|
|
56
|
+
"optional": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
51
59
|
"files": [
|
|
52
60
|
"lib/**/*"
|
|
53
61
|
]
|