Skip to content

Commit d008aff

Browse files
committed
fix: roles handling
1 parent 0b30675 commit d008aff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/client.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ const CoCreateUser = {
4343

4444
// const socket = Crud.socket.getSockets()
4545
// if (!socket[0] || !socket[0].connected || window && !window.navigator.onLine) {
46+
47+
// ToDo: remove roles handling from client and implement a serverside solution similar to lazyloader webooks processOperators
4648
let key = {
4749
status: 'await',
4850
method: 'object.create',
@@ -51,7 +53,7 @@ const CoCreateUser = {
5153
_id: user.object[0]._id,
5254
type: "user",
5355
key: user.object[0]._id,
54-
roles: user.object[0].roles,
56+
roles: user.object[0].roles || [user.object[0]['roles[]']],
5557
email: user.object[0].email,
5658
password: user.object[0].password || btoa('0000'),
5759
array: user.array

0 commit comments

Comments
 (0)