@autofleet/zehut 3.1.2-beta.13 → 3.1.2-beta.14
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/api-user-flows.test.js +1 -1
- package/lib/utils.js +1 -1
- package/package.json +1 -1
|
@@ -136,7 +136,7 @@ describe('E2E', () => {
|
|
|
136
136
|
closeServer1();
|
|
137
137
|
expect(error.message).toEqual('Entity id on elevatePermissions is not a valid UUID, provided: nnn');
|
|
138
138
|
});
|
|
139
|
-
it
|
|
139
|
+
it('should correctly handle elevation of permissions and their reversion', async () => {
|
|
140
140
|
let capturedError = null;
|
|
141
141
|
// Snapshots to capture state after each step
|
|
142
142
|
let afterFirstElevationElevated = {
|
package/lib/utils.js
CHANGED
|
@@ -98,7 +98,7 @@ const getContextAttributes = (contextId, decodedToken) => {
|
|
|
98
98
|
};
|
|
99
99
|
exports.getContextAttributes = getContextAttributes;
|
|
100
100
|
const mergePermissions = (target, sources) => {
|
|
101
|
-
const base =
|
|
101
|
+
const base = structuredClone(target);
|
|
102
102
|
Object.keys(sources).forEach((topLevelKey) => {
|
|
103
103
|
base[topLevelKey] ?? (base[topLevelKey] = {});
|
|
104
104
|
Object.entries(sources[topLevelKey]).forEach(([entityId, perms]) => {
|