webservice/src/helpers.js
/**
 * Function to check the token, but encoded and decoded
 * @param parsed the decoded one
 * @return {boolean} true or false whether the token satisfies the constraints
 */
Function to check the token, but encoded and decoded
@param parsed the decoded one
@return {boolean} true or false whether the token satisfies the constraints
Function to check the token but encoded and decoded @param parsed the decoded one @return { boolean } true or false whether the token satisfies the constraints
function checkToken(parsed) {
  if (!parsed.groups || !parsed.groups.length) {
    Toastr.error('You do not belong to any namespace to see laboratories');
    return false;
  }
  if (!parsed.namespace || !parsed.namespace[0]) {
    Toastr.error(
      'You do not have your own namespace where to run laboratories'
    );
    return false;
  }
  return true;
}
function checkToken ( parsed ) { if ( ! parsed . groups || ! parsed . groups . length ) { Toastr . error ( 'You do not belong to any namespace to see laboratories' ) ; return false ; } if ( ! parsed . namespace || ! parsed . namespace [ 0 ] ) { Toastr . error ( 'You do not have your own namespace where to run laboratories' ) ; return false ; } return true ; }
Function to check the token, but encoded and decoded
 @param parsed the decoded one
 @return {boolean} true or false whether the token satisfies the constraints
Function to check the token but encoded and decoded @param parsed the decoded one @return { boolean } true or false whether the token satisfies the constraints