sscpac / chat-locker

Have your own Slack like online chat, built with Meteor and enhanced security.
MIT License
8 stars 2 forks source link

Chat-locker User fields overwritten at login / startup #74

Closed rwakida closed 9 years ago

rwakida commented 9 years ago

To replicate;

  1. Login as testuser1
  2. create a online custom status message
  3. view users collection. status message saved in profile.statusMessages
  4. logout and login again as testuser1
  5. view users collection. status message field is missing.

At initial startup/login, we retrieve the user's information from LDAP and do an upsert with the whole user object. chat-locker specific properties at the root level (like status field) are not overwritten. However, child objects (like profile) clobber existing profile objects.

To fix, we need to do one of the following:

  1. store chat-locker specific properties at the root level
  2. individually declare fields to overwrite
  3. store chat-locker fields in child object with different name then child objects from LDAP