src/utilities/helpers.js
/**
 * This functions get users' groups assigned by Keycloak and see if user has access to this application
 *
 * @param groups
 * @returns {boolean}
 */
This functions get users' groups assigned by Keycloak and see if user has access to this application
@param groups
@returns {boolean}
This functions get users ' groups assigned by Keycloak and see if user has access to this application @param groups @returns { boolean }
function isPage401(groups) {
  let pageStatus = false; 
  pageStatus = (groups.length > 0) ? false : true; 
  if (! pageStatus) { 
    pageStatus = groups.find(app => app.split('_')[0] === appName) ? false : true; 
  }
  return pageStatus;
}
function isPage401 ( groups ) { let pageStatus = false ; pageStatus = ( groups . length > 0 ) ? false : true ; if ( ! pageStatus ) { pageStatus = groups . find ( app => app . split ( '_' ) [ 0 ] === appName ) ? false : true ; } return pageStatus ; }
This functions get users' groups assigned by Keycloak and see if user has access to this application
 @param groups
 @returns {boolean}
This functions get users ' groups assigned by Keycloak and see if user has access to this application @param groups @returns { boolean }
// assume it's not page401 // if groups exist then that's not page401 // if groups exist then we apply another check // app name is same as role assigned