vicinityManager/server/services/sharingRules.js
/*
A device changes its accessLevel
I need to remove/add from/to the commServer groups accordingly
*/
A device changes its accessLevel
I need to remove/add from/to the commServer groups accordingly
A device changes its accessLevel I need to remove / add from / to the commServer groups accordingly
function changePrivacy(updates){
  var oldStatus = Number(updates.oldAccessLevel);
  var newStatus = Number(updates.accessLevel);
  return new Promise(
    function(resolve, reject) {
    logger.debug(oldStatus + ' to ' + newStatus);
    findCase(oldStatus, newStatus, updates, function(error, result){
      logger.debug('END change accessLevel');
      logger.debug('Error: ' + error + ', Result: ' + result);
      resolve({error: error, result:result});
    });
  });
}
function changePrivacy ( updates ) { var oldStatus = Number ( updates . oldAccessLevel ) ; var newStatus = Number ( updates . accessLevel ) ; return new Promise ( function ( resolve , reject ) { logger . debug ( oldStatus + ' to ' + newStatus ) ; findCase ( oldStatus , newStatus , updates , function ( error , result ) { logger . debug ( 'END change accessLevel' ) ; logger . debug ( 'Error: ' + error + ', Result: ' + result ) ; resolve ( { error : error , result : result } ) ; } ) ; } ) ; }
A device changes its accessLevel
I need to remove/add from/to the commServer groups accordingly
A device changes its accessLevel I need to remove / add from / to the commServer groups accordingly