Skip to content

Commit

Permalink
ajout : choix du protocole CAS
Browse files Browse the repository at this point in the history
  • Loading branch information
ynaessens committed Aug 2, 2023
1 parent a7b3eca commit 2c58f28
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 9 deletions.
24 changes: 21 additions & 3 deletions admin/admin_config_sso.php
Expand Up @@ -3,7 +3,7 @@
* admin_config_sso.php
* Interface permettant l'activation de la prise en compte d'un environnement SSO
* Ce script fait partie de l'application GRR
* Dernière modification : $Date: 2023-07-27 11:53$
* Dernière modification : $Date: 2023-08-02 18:08$
* @author Laurent Delineau & JeromeB & Yan Naessens
* @copyright Copyright 2003-2023 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
Expand All @@ -30,7 +30,7 @@
showAccessDenied($back);
exit();
}
if (isset($_POST['valid']))
if (isset($_POST['valid'])) // enregistrement des données entrées
{
VerifyModeDemo();

Expand All @@ -44,6 +44,8 @@
echo "Erreur lors de l'enregistrement de cas_proxy_server !<br />";
if (!Settings::set("cas_proxy_port", $_POST['cas_proxy_port']))
echo "Erreur lors de l'enregistrement de cas_proxy_port !<br />";
if (!Settings::set("cas_version", $_POST['cas_version']))
echo "Erreur lors de l'enregistrement de cas_version !<br />";

if (!isset($_POST['cacher_lien_deconnecter']))
$cacher_lien_deconnecter = "n";
Expand Down Expand Up @@ -146,6 +148,9 @@
if (!Settings::set("cas_logout", $cas_logout))
echo "Erreur lors de l'enregistrement de cas_logout !<br />";
}
// récupération des données enregistrées
$CAS = array('CAS_VERSION_1_0','CAS_VERSION_2_0','CAS_VERSION_3_0','SAML_VERSION_1_1'); // protocoles admissibles
$cas_version = Settings::get('cas_version');

if (authGetUserLevel(getUserName(), -1) < 6)
{
Expand Down Expand Up @@ -211,6 +216,19 @@
echo "<h2>".get_vocab("config_cas_title")."</h2>\n";
echo "<div>\n<input type=\"hidden\" name=\"valid\" value=\"1\" /></div>\n";
echo "<p>".get_vocab("CAS_SSO_explain")."</p>\n";
echo '<div class="form-group row col-xs-12">'.PHP_EOL;
echo '<label class="col col-sm-6 col-xs-12" for="cas_version">'.get_vocab('cas_version').'</label>'.PHP_EOL;
echo '<div class="col col-sm-6 col-xs12">'.PHP_EOL;
echo '<select class="form-control" name="cas_version" id="cas_version">';
foreach($CAS as $cas){
echo '<option value="'.$cas.'" ';
if($cas == $cas_version)
echo "selected";
echo '>'.$cas.'</option>';
}
echo '</select>'.PHP_EOL;
echo '</div>
</div>';
echo "<h3>".get_vocab("Statut_par_defaut_utilisateurs_importes")."</h3>\n";
echo "<div>".get_vocab("choix_statut_CAS_SSO")."<br />\n";
echo "<input type=\"radio\" name=\"sso_statut\" value=\"cas_visiteur\" ";
Expand Down Expand Up @@ -370,4 +388,4 @@
echo "</div>\n";
// et de la page
end_page();
?>
?>
3 changes: 2 additions & 1 deletion language/lang.de
@@ -1,7 +1,7 @@
<?php
# GRR: Translations provided by: Karsten Schinkel, Jean-Yves Migeon - jeanyves.migeon@free.fr, Alex
# GRR : fichier de langue allemande
# Last modification : 2023-07-27
# Last modification : 2023-08-02
# Charset (jeu de caractères) utilisé dans l'en-tête des pages HTML
$charset_html = "utf-8";
$vocab = array();
Expand Down Expand Up @@ -195,6 +195,7 @@ $vocab['cas_racine'] = "Racine"; // A traduire
$vocab['cas_proxy_explain'] = "If GRR has to go through a proxy server to access CAS server, it may be necessary to complete the next fields";
$vocab['cas_proxy_server'] = "IP-Addresse des Proxy-Servers";
$vocab['cas_proxy_port'] = "Proxy Port";
$vocab['cas_version'] = "CAS-Protokollversion";
$vocab['autor_contact'] = "Wenden Sie sich an den Autor";
$vocab['autres parametres sso'] = "Verschieden Einstellungen";
$vocab['avertissement_change_type'] = "ACHTUNG: die zwei Konfigurationsarten der Reservierungsabstände sind nicht miteinander vereinbar: die Änderung der Konfigurationsarten wird, nach der Bestätigung, die Gesamtheit der Reservierungen dieses Bereiches löschen.";
Expand Down
3 changes: 2 additions & 1 deletion language/lang.en
@@ -1,7 +1,7 @@
<?php
# GRR: Translations provided by: Patricia Gaubert-Dubois et Yan Naessens
# GRR : fichier de langue anglaise
# Last modification : 2023-07-27
# Last modification : 2023-08-02
# Charset (jeu de caractères) utilisé dans l'en-tête des pages HTML
$charset_html = "utf-8";
$vocab = array();
Expand Down Expand Up @@ -200,6 +200,7 @@ $vocab['cas_racine'] = "Root";
$vocab['cas_proxy_explain'] = "If GRR has to go through a proxy server to access CAS server, it may be necessary to complete the next fields";
$vocab['cas_proxy_server'] = "Proxy server IP address";
$vocab['cas_proxy_port'] = "Proxy port";
$vocab['cas_version'] = "CAS protocol version";
$vocab['autor_contact'] = "Contact author";
$vocab['autres_parametres_sso'] = "Miscellaneous parameters";
$vocab['avertissement_change_type'] = "CAUTION: both types of configuration of time slots are incompatible: a change of the type of time slots leads to, after validation, a deletion of all the reservations of this area.";
Expand Down
5 changes: 3 additions & 2 deletions language/lang.es
@@ -1,6 +1,6 @@
<?php
# GRR : fichier de langue espagnole
# Last modification : 2023-07-27
# Last modification : 2023-08-02
# Charset (jeu de caractères) utilisé dans l'en-tête des pages HTML
$charset_html = "utf-8";
$vocab = array();
Expand Down Expand Up @@ -191,7 +191,8 @@ $vocab['cas_port'] = "Port"; // A traduire
$vocab['cas_racine'] = "Racine"; // A traduire
$vocab['cas_proxy_explain'] = "If GRR has to go through a proxy server to access CAS server, it may be necessary to complete the next fields";
$vocab['cas_proxy_server'] = "Proxy server IP address";
$vocab['cas_proxy_port'] = "Proxy port";
$vocab['cas_proxy_port'] = "Proxy port";
$vocab['cas_version'] = "Versión del protocolo CAS";
$vocab['autor_contact'] = "Contactar al autor";
$vocab['autres_parametres_sso'] = "Paramètres divers"; // A traduire
$vocab['avertissement_change_type'] = "CUIDADO: los dos tipos de configuración de los huecos horarios están incompatibles entre sí: un cambio del tipo de huecos horarios genera entonces, después de validar, un borrado de todas las reservas de este campo.";
Expand Down
3 changes: 2 additions & 1 deletion language/lang.fr
@@ -1,6 +1,6 @@
<?php
# GRR : fichier de langue française
# Last modification : 2023-07-27
# Last modification : 2023-08-02
# Charset (jeu de caractères) utilisé dans l'en-tête des pages HTML
$charset_html = "utf-8";
$vocab = array();
Expand Down Expand Up @@ -196,6 +196,7 @@ $vocab['cas_racine'] = "Racine";
$vocab['cas_proxy_explain'] = "Si le serveur hébergeant GRR est derrière un proxy, il peut être nécessaire de renseigner les valeurs suivantes : ";
$vocab['cas_proxy_server'] = "Adresse IP du serveur proxy";
$vocab['cas_proxy_port'] = "Port";
$vocab['cas_version'] = "Version du protocole CAS";
$vocab['autor_contact'] = "Contacter l'auteur";
$vocab['autres_parametres_sso'] = "Paramètres divers";
$vocab['avertissement_change_type'] = "ATTENTION : les deux types de configuration des créneaux sont incompatibles entre eux : un changement du type de créneaux entraîne donc, après validation, un effacement de toutes les réservations de ce domaine.";
Expand Down
3 changes: 2 additions & 1 deletion language/lang.it
@@ -1,7 +1,7 @@
<?php
# GRR: Translations provided by: Marc HENNETIER and Antony AUDOUARD
# GRR : fichier de langue italienne
# Last modification : 2023-07-27
# Last modification : 2023-08-02
# Charset (jeu de caractères) utilisé dans l'en-tête des pages HTML
$charset_html = "utf-8";
$vocab = array();
Expand Down Expand Up @@ -195,6 +195,7 @@ $vocab['cas_racine'] = "Racine"; // A traduire
$vocab['cas_proxy_explain'] = "If GRR has to go through a proxy server to access CAS server, it may be necessary to complete the next fields";
$vocab['cas_proxy_server'] = "Proxy server IP address";
$vocab['cas_proxy_port'] = "Proxy port";
$vocab['cas_version'] = "Versione protocollo CAS";
$vocab['autor_contact'] = "contattare l'autore";
$vocab['autres_parametres_sso'] = "Paramètres divers"; // A traduire
$vocab['avertissement_change_type'] = "Attenzione: i due tipi di configurazione degli interstizi sono incompatibili tra essi: un cambiamento del tipo di interstizi trascina dunque, dopo convalida, una cancellazione di tutte le prenotazioni di questo campo.";
Expand Down

0 comments on commit 2c58f28

Please sign in to comment.