',_("Scanner ceci avec freeOTP"),'
'; - + echo '',_("Scanner ceci avec votre application OTP"),'
'; + ?> +-
+
- + FreeOTP (libre) + +
- + AEgis Authenticator (libre) + +
- + Google Authenticator + +
diff --git a/html/ajax.php b/html/ajax.php index a58f7a40b..fdc5e582c 100644 --- a/html/ajax.php +++ b/html/ajax.php @@ -36,6 +36,12 @@ $cn=Dossier::connect(); $g_parameter=new Noalyss_Parameter_Folder($cn); $g_user=new Noalyss_user($cn); $g_user->check(true); +/** + * check if 2FA is completed + */ +if ( ! $g_user->is_double_identified()) { + exit(); +} IDate::set_firstDate($g_user->get_first_week_day()); ITva_Popup::set_vat_code($g_user->get_vat_code_preference()); diff --git a/html/ajax_misc.php b/html/ajax_misc.php index 6cf1c689d..f1c4ca6dc 100644 --- a/html/ajax_misc.php +++ b/html/ajax_misc.php @@ -96,7 +96,12 @@ else $g_user = new Noalyss_user($cn); $g_user->check(true); } - +/** + * check if 2FA is completed + */ +if ( ! $g_user->is_double_identified()) { + exit(); +} IDate::set_firstDate($g_user->get_first_week_day()); ITva_Popup::set_vat_code($g_user->get_vat_code_preference()); diff --git a/html/compute.php b/html/compute.php index ccbadc33a..0a2fbc2d4 100644 --- a/html/compute.php +++ b/html/compute.php @@ -61,6 +61,12 @@ $q=noalyss_str_replace(",",".",$q); $cn=Dossier::connect(); $User=new Noalyss_user($cn); $User->Check(); +/** + * check if 2FA is completed + */ +if ( ! $User->is_double_identified()) { + exit(); +} $User->check_dossier(Dossier::id()); // Retrieve the rate of vat, it $t == -1 it means no VAT diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css index 49a053ec6..ef5d27092 100644 --- a/html/css/style-classic7.css +++ b/html/css/style-classic7.css @@ -3690,8 +3690,39 @@ margin:1px; */ #info_passid { position:absolute; - background-color: rgba(246, 180, 157, 0.58); - color:red; + background-color: rgba(246, 180, 157, 0.80); + color:#b90707; + font-size:100%; + z-index:10; + top:200px; + left:326px; + } + @media (min-width: 576px) { + #info_passid { + top:305px; + left:326px; + } + } + /* MeDium */ + @media (min-width: 768px) { + #info_passid { + top:305px; + left:326px; + } + } + /* LarGe */ + @media (min-width: 992px) { + #info_passid { + top:305px; + left:326px; + } + } + /* eXtraLarge */ + @media (min-width: 1200px) { + #info_passid { + top:305px; + left:30%; + } } /** followup : detail : list of concerned actions **/ diff --git a/html/direct.php b/html/direct.php index d145a1eb8..d78dfd527 100644 --- a/html/direct.php +++ b/html/direct.php @@ -32,6 +32,12 @@ global $g_user; $http=new \HttpInput(); $g_user=new Noalyss_user($cn); $g_user->Check(); +/** + * check if 2FA is completed + */ +if ( ! $g_user->is_double_identified()) { + exit(); +} $g_user->check_dossier($http->get('gDossier')); $res=$cn->exec_sql("select distinct code,coalesce(description,code) description from get_profile_menu($1) where code ~* $2 or description ~* $2 order by code limit 5 ",array($g_user->get_profile(),$http->post("acs"))); $nb=Database::num_row($res); diff --git a/html/do.php b/html/do.php index e15a657ca..b75e8a838 100644 --- a/html/do.php +++ b/html/do.php @@ -96,6 +96,13 @@ if ( DEBUGNOALYSS > 1 ) { $g_parameter=new Noalyss_Parameter_Folder($cn); $g_user->Check(); +if ( ! $g_user->is_double_identified()) { + echo "
+
++ Date et heure : + =$date->format('d/m/Y h:i')?> +
++ Entrez le code que vous avez reçu par email ou sur votre application OTP. +
++ Rafraichissez la page pour recevoir un nouveau code. +
+ +