From 53e78ab2ed720de17be345b05d43207a674b3145 Mon Sep 17 00:00:00 2001 From: Tomasz Date: Wed, 3 Apr 2024 20:24:06 +0000 Subject: [PATCH] new approach to openroaming tests during profile save --- web/admin/edit_profile_result.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/web/admin/edit_profile_result.php b/web/admin/edit_profile_result.php index 6b7415cc7..5ce92a4fa 100644 --- a/web/admin/edit_profile_result.php +++ b/web/admin/edit_profile_result.php @@ -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. @@ -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); + ?>