function buildAllRoles(all, roles) {
  all.push(...roles);
  _.forEach(roles, function(role) {
    // check if have inherits
    if (ROLE_INHERIT[role]) {
      all = buildAllRoles(all, ROLE_INHERIT[role]);
    }
  });
  return all;
}
function buildAllRoles(all, roles) {
  all.push(...roles);
  _.forEach(roles, function(role) {
    
    if (ROLE_INHERIT[role]) {
      all = buildAllRoles(all, ROLE_INHERIT[role]);
    }
  });
  return all;
}
function buildAllRoles ( all , roles ) { all . push ( ... roles ) ; _ . forEach ( roles , function ( role ) { // check if have inherits if ( ROLE_INHERIT [ role ] ) { all = buildAllRoles ( all , ROLE_INHERIT [ role ] ) ; } } ) ; return all ; }
build a list of all roles and inherits
build a list of all roles and inherits