@firecms/user_management 3.4.0-canary.f6a889a → 3.4.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/user_management",
3
3
  "type": "module",
4
- "version": "3.4.0-canary.f6a889a",
4
+ "version": "3.4.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -29,9 +29,9 @@
29
29
  "types": "./dist/index.d.ts",
30
30
  "source": "src/index.ts",
31
31
  "dependencies": {
32
- "@firecms/core": "3.4.0-canary.f6a889a",
33
- "@firecms/formex": "3.4.0-canary.f6a889a",
34
- "@firecms/ui": "3.4.0-canary.f6a889a",
32
+ "@firecms/core": "3.4.0",
33
+ "@firecms/formex": "3.4.0",
34
+ "@firecms/ui": "3.4.0",
35
35
  "date-fns": "^3.6.0"
36
36
  },
37
37
  "peerDependencies": {
@@ -200,7 +200,7 @@ export function useBuildUserManagement<CONTROLLER extends AuthController<any> =
200
200
  path: usersPath,
201
201
  id: userExists.uid
202
202
  }
203
- await dataSourceDelegate.deleteEntity({ entity })
203
+ await dataSourceDelegate.deleteEntity({ entity, pathSegments: undefined })
204
204
  .then(() => {
205
205
  console.debug("Deleted previous user", userExists);
206
206
  })
@@ -213,6 +213,10 @@ export function useBuildUserManagement<CONTROLLER extends AuthController<any> =
213
213
  return dataSourceDelegate.saveEntity({
214
214
  status: "existing",
215
215
  path: usersPath,
216
+ // `usersPath` / `rolesPath` are configurable path strings this hook never parses.
217
+ // Segments are left undefined rather than split out of one: absent means "not known
218
+ // here", and a split would be wrong for any configured id containing "/".
219
+ pathSegments: undefined,
216
220
  entityId: email,
217
221
  values: removeUndefined(data)
218
222
  }).then(() => user);
@@ -229,6 +233,10 @@ export function useBuildUserManagement<CONTROLLER extends AuthController<any> =
229
233
  return dataSourceDelegate.saveEntity({
230
234
  status: "existing",
231
235
  path: rolesPath,
236
+ // `usersPath` / `rolesPath` are configurable path strings this hook never parses.
237
+ // Segments are left undefined rather than split out of one: absent means "not known
238
+ // here", and a split would be wrong for any configured id containing "/".
239
+ pathSegments: undefined,
232
240
  entityId: id,
233
241
  values: removeUndefined(roleData)
234
242
  }).then(() => {
@@ -246,7 +254,7 @@ export function useBuildUserManagement<CONTROLLER extends AuthController<any> =
246
254
  id: uid,
247
255
  values: {}
248
256
  };
249
- await dataSourceDelegate.deleteEntity({ entity })
257
+ await dataSourceDelegate.deleteEntity({ entity, pathSegments: undefined })
250
258
  }, [usersPath, dataSourceDelegate?.initialised]);
251
259
 
252
260
  const deleteRole = useCallback(async (role: Role): Promise<void> => {
@@ -259,7 +267,7 @@ export function useBuildUserManagement<CONTROLLER extends AuthController<any> =
259
267
  id: id,
260
268
  values: {}
261
269
  };
262
- await dataSourceDelegate.deleteEntity({ entity })
270
+ await dataSourceDelegate.deleteEntity({ entity, pathSegments: undefined })
263
271
  }, [rolesPath, dataSourceDelegate?.initialised]);
264
272
 
265
273
  const collectionPermissions: PermissionsBuilder = useCallback(({