[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: Task #1223 - Empêcher accès informati
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: Task #1223 - Empêcher accès information système #1223 Remove access to Information System |
Date: |
Tue, 10 Nov 2015 01:12:23 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit f4cff04ef8627a1419ec8433c2bb9839f4a551b4
Author: Dany De Bontridder <address@hidden>
Date: Tue Nov 10 02:06:02 2015 +0100
Task #1223 - Empêcher accès information système
#1223 Remove access to Information System
---
include/admin_repo.inc.php | 2 +-
include/constant.php | 5 ++++-
include/lib/config_file.php | 2 ++
include/lib/user_menu.php | 22 ++++++++++++++++++----
4 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/include/admin_repo.inc.php b/include/admin_repo.inc.php
index 3cbf22f..140a3a4 100644
--- a/include/admin_repo.inc.php
+++ b/include/admin_repo.inc.php
@@ -102,7 +102,7 @@ if ($action== 'audit_log')
/*
* Display information about current installation
*/
-if ( $action == "info") {
+if ( $action == "info" && SYSINFO_DISPLAY == true) {
echo "<h2>"._('Variables').":".NOALYSS_INCLUDE.'/config.inc.php </h2>';
echo '<ul style="list-style:square">';
echo "<li>". "NOALYSS_HOME".": ".NOALYSS_HOME."</li>";
diff --git a/include/constant.php b/include/constant.php
index 01d789e..bed4db3 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -99,7 +99,10 @@ if ( !defined("SITE_UPDATE"))
if ( !defined("SITE_UPDATE_PLUGIN"))
define
("SITE_UPDATE_PLUGIN",'http://www.noalyss.eu/plugin_last_version.txt');
-
+// If you don't want that the system information is accessible
+if ( ! defined ("SYSINFO_DISPLAY")) {
+ define ("SYSINFO_DISPLAY",TRUE);
+}
define ("DBVERSION",122);
define ("MONO_DATABASE",25);
define ("DBVERSIONREPO",16);
diff --git a/include/lib/config_file.php b/include/lib/config_file.php
index 8cf8b69..c342392 100644
--- a/include/lib/config_file.php
+++ b/include/lib/config_file.php
@@ -191,6 +191,8 @@ function display_file_config($p_array,$from_setup=1,$p_os=1)
print ( "// published"."\r\n");
print ( '// define ("SITE_UPDATE","");'."\r\n");
print ( '// define ("SITE_UPDATE_PLUGIN","");'."\r\n");
+ print ( '// To allow to access the Info system'."\r\n");
+ print ( '// define ("SYSINFO_DISPLAY",true);'."\r\n");
print ('?>');
}
/*!\brief create the config file
diff --git a/include/lib/user_menu.php b/include/lib/user_menu.php
index 4e81952..9926755 100644
--- a/include/lib/user_menu.php
+++ b/include/lib/user_menu.php
@@ -113,22 +113,36 @@ function MenuAdmin()
}
if (!defined("MULTI")||(defined("MULTI")&&MULTI==1))
{
- $item=array
(array("admin-noalyss.php?action=user_mgt",_("Utilisateurs"),_('Gestion des
utilisateurs'),0),
+ $tmp_item=array (
+
array("admin-noalyss.php?action=user_mgt",_("Utilisateurs"),_('Gestion des
utilisateurs'),0),
array("admin-noalyss.php?action=dossier_mgt",_("Dossiers"),_('Gestion des
dossiers'),1),
array("admin-noalyss.php?action=modele_mgt",_("Modèles"),_('Gestion des
modèles'),2),
array("admin-noalyss.php?action=restore",_("Restaure"),_("Restaure une base de
données"),3),
array("admin-noalyss.php?action=upgrade",_("Mise à
jour"),_("Mise à jour du système et des bases de données"),5),
array("admin-noalyss.php?action=audit_log",_("Audit"),_("Utilisateurs qui se
sont connectés"),4),
array("admin-noalyss.php?action=info",_("Information
système"),('Information à propos de votre installation'),6),
- array("login.php",_("Accueil")),
- array("logout.php",_("Sortie"))
+ array("login.php",_("Accueil"),"",7),
+ array("logout.php",_("Sortie"),"",8)
);
+ if ( SYSINFO_DISPLAY == false ) {
+ $nb_item = count($tmp_item);
+ for ($i=0;$i<$nb_item;$i++) {
+ if ($tmp_item[$i][3] <> 6 ) {
+ $item[]=$tmp_item[$i];
+ }
+ }
+ } else {
+ $item = $tmp_item;
+ }
}
else
{
$item=array
(array("admin-noalyss.php?action=user_mgt",_("Utilisateurs"),_('Gestion des
utilisateurs'),0),
array("admin-noalyss.php?action=audit_log",_("Audit"),_("Utilisateurs qui se
sont connectés"),4),
- array("login.php",_("Accueil"))
+ array("admin-noalyss.php?action=upgrade",_("Mise à
jour"),_("Mise à jour du système et des bases de données"),5),
+ array("admin-noalyss.php?action=info",_("Information
système"),('Information à propos de votre installation'),6),
+ array("login.php",_("Accueil")),
+ array("logout.php",_("Sortie"))
);
}