Bug 8641 - Add information warning about log-in as root user to About->System information

Add warning to 'About->System information' if an user is logged in as
database admiinsitrative user (root user).

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Marc Veron 2012-08-14 20:45:22 +02:00 committed by Paul Poulain
parent ef7ebc4ed4
commit 60790d0aef
2 changed files with 8 additions and 0 deletions

View File

@ -72,6 +72,8 @@ my $warnPrefEasyAnalyticalRecords = ( $prefEasyAnalyticalRecords && $prefUseCo
my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
my $warnIsRootUser = (! $loggedinuser);
$template->param(
kohaVersion => $kohaVersion,
osVersion => $osVersion,
@ -87,6 +89,7 @@ $template->param(
warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities,
warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords,
errZebraConnection => $errZebraConnection,
warnIsRootUser => $warnIsRootUser,
);
my @components = ();

View File

@ -98,6 +98,11 @@
</div>
<div id="sysinfo">
[% IF (warnIsRootUser) %]
<h2>Warning regarding current user</h2>
<p>It seems that you are logged in as database administrative user. A lot of things will not work with this account.</p>
<p>Usually you need to log in with a regular staff account. To create a staff account, create a branch, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.</p>
[% END %]
<h2>Warnings regarding the system configuration</h2>
[% IF ( (prefNoZebra) || (warnPrefBiblioAddsAuthorities) || warnPrefEasyAnalyticalRecords ) %]
<table>