code: function canEdit(item, user) {
          user = user || {};
  
          if (user.role === 'admin') { return true; }
  
          var username = user.username || user.name;
          return item && user && (!item.createUsername || item.createUsername === username);
      }
docs: @module({ "client": true }) 
  Determine if for a given item (document from the database), a user
  can edit it. This is true if the user is an admin or if they are the
  ones who created it.
  
  @param item
  @param user
  @returns {*|boolean}