Skip to content

Commit

Permalink
new approach to openroaming tests during profile save
Browse files Browse the repository at this point in the history
  • Loading branch information
twoln committed Apr 3, 2024
1 parent a8ee7d6 commit 53e78ab
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions web/admin/edit_profile_result.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,32 @@
}
}
$reloadedProfileNr2->prepShowtime();

// do OpenRoaming initial diagnostic checks
// numbers correspond to RFC7585Tests::OVERALL_LEVEL
$resultLevel = \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO;
if (sizeof($reloadedProfileNr2->getAttributes("media:openroaming")) > 0) {
$orTests = $reloadedProfileNr2->openroamingRedinessTest();
foreach ($orTests as $orTest) {
switch ($orTest['level']) {
case \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_ERROR:
echo $uiElements->boxError($orTest['explanation']);
break;
case \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_WARN:
echo $uiElements->boxWarning($orTest['explanation']);
break;
case \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_NOTE:
echo $uiElements->boxRemark($orTest['explanation']);
break;
case \core\diag\AbstractTest::RETVAL_OK:
echo $uiElements->boxOkay($orTest['explanation']);
break;
default:
break;
}
}

}
/*
$resultLevel = \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_GOOD; // assume all is well, degrade if we have concrete findings to suggest otherwise
$tag = "aaa+auth:radius.tls.tcp";
// do we know the realm at all? Notice if not.
Expand Down Expand Up @@ -330,7 +351,10 @@
echo $uiElements->boxOkay(_("Initial diagnostics regarding the DNS part of OpenRoaming (including DNSSEC) were successful."));
}
}
$reloadedProfileNr2->setOpenRoamingReadinessInfo($resultLevel);
*
*/
// $reloadedProfileNr2->setOpenRoamingReadinessInfo($resultLevel);

?>
</table>
<br/>
Expand Down

0 comments on commit 53e78ab

Please sign in to comment.