Better visibility of the https
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 26 Jan 2007 12:19:15 +0000 (12:19 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 26 Jan 2007 12:19:15 +0000 (12:19 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1397 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/css/default.css
modules/auth.php
templates/core/password_prompt.tpl
templates/skin/common.menu.tpl

index b1ab0a0..c3e8da1 100644 (file)
@@ -161,6 +161,15 @@ table.tinybicol th, table.bicol th {
     text-align: center;
     vertical-align: middle;
 }
+
+table.tinybicol th a:link, table.tinybicol th a:visited,
+table.tinybicol th a:active, table.tinybicol th a:hover,
+table.bicol th a:link, table.bicol th a:visited,
+table.bicol th a:active, table.bicol th a:hover {
+    color: #9999FF;
+    background: inherit;
+}
+
 table.tinybicol td, table.bicol td {
     color: #000000;
     background: inherit;
index 35618c1..a9afa5f 100644 (file)
@@ -24,6 +24,7 @@ class AuthModule extends PLModule
     function handlers()
     {
         return array(
+            'login'             => $this->make_hook('login',      AUTH_COOKIE),
             'groupex/donne-chall.php'
                                 => $this->make_hook('chall',      AUTH_PUBLIC),
             'groupex/export-econfiance.php'
@@ -38,6 +39,14 @@ class AuthModule extends PLModule
         );
     }
 
+    function handler_login(&$page)
+    {
+        $allkeys = func_get_args();
+        unset($allkeys[0]);
+        $url = join('/',$allkeys);
+        pl_redirect($url ? $url : 'events');
+    } 
+
     function handler_chall(&$page)
     {
         $_SESSION["chall"] = uniqid(rand(), 1);
@@ -127,6 +136,7 @@ class AuthModule extends PLModule
     function handler_groupex(&$page)
     {
         require_once dirname(__FILE__).'/auth/auth.inc.php';
+        $page->assign('referer', true);
 
         $gpex_pass = $_GET["pass"];
         $gpex_url  = urldecode($_GET["url"]);
index 29aea88..e16de14 100644 (file)
   </p>
 </noscript>
 
-{if $smarty.server.HTTP_REFERER}
+{if $referer || $platal->pl_self() neq 'login'}
 <h1>
   Accès restreint
 </h1>
 <p>
   Bonjour,<br />
-  La page que vous avez demandé (<strong>{$smarty.server.HTTP_REFERER}</strong>) nécessite une authentification
+  La page que vous avez demandé
+  (<strong>{if $referer}{$smarty.server.HTTP_REFERER}{else}{$globals->baseurl}/{$platal->pl_self()}{/if}</strong>)
+  nécessite une authentification.
 </p>
 {else}
 <h1>
@@ -75,7 +77,11 @@ Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi
 <form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;">
   <table class="bicol" cellpadding="4" summary="Formulaire de login">
     <tr>
-      <th colspan="2">Connexion</th>
+      <th colspan="2">{if $smarty.server.HTTPS}{icon name=lock}{/if} Identification
+      {if !$smarty.server.HTTPS}
+      (<a href="{$globals->baseurl|replace:"http":"https"}/{$platal->pl_self()}">{icon name=lock_add} Passer en connexion sécurisée</a>)
+      {/if}
+      </th>
     </tr>
     <tr style="white-space: nowrap">
       <td class="titre">
@@ -126,6 +132,25 @@ Probl
 (Activer obligatoirement le <strong>javascript</strong>)
 </p>
 
+<hr />
+
+<div class="smaller">
+  {if $smarty.server.HTTPS}
+  {icon name=lock} : Vous utilisez actuellement une connexion HTTPS sécurisée. Aucune information ne circule
+  en clair entre chez vous en Polytechnique.org, ce qui permet d'assurer une confidentialité maximale.
+  {else}
+  {icon name=lock_open} : Vous utilisez actuellement une connexion HTTP non sécurisée. Toutes les informations
+  (<strong>excepté le mot de passe de connexion au site</strong>) circulent en clair entre chez vous et 
+  Polytechnique.org. Il vous est possible d'utiliser une connexion sécurisée en cliquant sur le lien
+  <div class="center">
+  <a href="{$globals->baseurl|replace:"http":"https"}/{$platal->pl_self()}">
+    {icon name=lock_add} Passer en connexion sécurisée</a>
+  </div><br />
+  Plus d'informations sur la connexion sécurisée se trouvent
+  <a href="Xorg/CertificatDeSécurité?display=light" class="popup2">sur cette page</a>.
+  {/if}
+</div>
+
 {if $smarty.request.response}<!-- failed login code //-->
 <br />
 <div class="erreur">
index 7a47557..fe52c75 100644 (file)
@@ -22,7 +22,7 @@
 
 {if !$smarty.session.auth}
 <div class="menu_title">Polytechniciens</div>
-<div class="menu_item"><a href="events">Me connecter !</a></div>
+<div class="menu_item"><a href="login">Me connecter !</a></div>
 <div class="menu_item"><a href="register">M'inscrire</a></div>
 <div class="menu_item"><a href="Xorg/PourquoiMInscrire">Pourquoi m'inscrire ?</a></div>