Skip to content

Commit

Permalink
fix: roles handling
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed May 9, 2024
1 parent 0b30675 commit d008aff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const CoCreateUser = {

// const socket = Crud.socket.getSockets()
// if (!socket[0] || !socket[0].connected || window && !window.navigator.onLine) {

// ToDo: remove roles handling from client and implement a serverside solution similar to lazyloader webooks processOperators
let key = {
status: 'await',
method: 'object.create',
Expand All @@ -51,7 +53,7 @@ const CoCreateUser = {
_id: user.object[0]._id,
type: "user",
key: user.object[0]._id,
roles: user.object[0].roles,
roles: user.object[0].roles || [user.object[0]['roles[]']],
email: user.object[0].email,
password: user.object[0].password || btoa('0000'),
array: user.array
Expand Down

0 comments on commit d008aff

Please sign in to comment.