If a user has a "deep" link to some graph/screen/whatever and he is not logged in he will get a "No permissions" error. This has confused users and they phoned helpdesk that zabbix is not working anymore... This patch changes the message to "Not signed in. Please click on "Login" on top right of the page.". Messages in english and german provided by the patch.
Patch is against 1.6.2 release.
Patch is against 1.6.2 release.
Code:
--- include/config.inc.php.orig 2009-01-30 07:34:09.000000000 +0100
+++ include/config.inc.php 2009-01-30 07:35:03.000000000 +0100
@@ -325,10 +325,15 @@
}
function access_deny(){
-
- include_once('include/page_header.php');
- show_error_message(S_NO_PERMISSIONS);
- include_once('include/page_footer.php');
+ if (empty($USER_DETAILS)) {
+ include_once('include/page_header.php');
+ show_error_message(S_NOT_LOGGEDIN);
+ include_once('include/page_footer.php');
+ } else {
+ include_once('include/page_header.php');
+ show_error_message(S_NO_PERMISSIONS);
+ include_once('include/page_footer.php');
+ }
}
function detect_page_type($default=PAGE_TYPE_HTML){
--- include/locales/de_de.inc.php.orig 2009-01-30 07:36:48.000000000 +0100
+++ include/locales/de_de.inc.php 2009-01-30 07:42:44.000000000 +0100
@@ -489,6 +489,7 @@
'S_DEFAULT_AUTHENTICATION'=> 'Standardauthentifizierung',
'S_LATEST_VALUES'=> 'Aktueller Wert',
'S_NO_PERMISSIONS'=> 'Keine Berechtigung !',
+ 'S_NOT_LOGGEDIN'=> 'Sie sind nicht angemeldet. Zum Anmelden rechts oben auf der Seite auf "Anmeldung" klicken.',
'S_LATEST_DATA_BIG'=> 'AKTUELLE DATEN',
'S_ALL_S'=> 'Alle',
'S_ALL_SMALL'=> 'alle',
@@ -1496,4 +1497,4 @@
'S_UNSUPPORTED_VERSION_OF_IMPORTED_DATA'=> 'Nicht unterstützte Version der Importdaten',
);
-?>
\ No newline at end of file
+?>
--- include/locales/en_gb.inc.php.orig 2009-01-30 07:37:08.000000000 +0100
+++ include/locales/en_gb.inc.php 2009-01-30 07:37:41.000000000 +0100
@@ -548,6 +548,7 @@
// Latest values
'S_LATEST_VALUES'=> 'Latest values',
'S_NO_PERMISSIONS'=> 'No permissions !',
+ 'S_NOT_LOGGEDIN'=> 'Not signed in. Please click on "Login" on top right of the page.',
'S_LATEST_DATA_BIG'=> 'LATEST DATA',
'S_ALL_S'=> 'All',
'S_ALL_SMALL'=> 'all',