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>
my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
+my $warnIsRootUser = (! $loggedinuser);
+
$template->param(
kohaVersion => $kohaVersion,
osVersion => $osVersion,
warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities,
warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords,
errZebraConnection => $errZebraConnection,
+ warnIsRootUser => $warnIsRootUser,
);
my @components = ();
</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>