Bug 8641 - Add information warning about log-in as root user to About->System information
authorMarc Veron <veron@veron.ch>
Tue, 14 Aug 2012 18:45:22 +0000 (20:45 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 13 Sep 2012 16:56:31 +0000 (18:56 +0200)
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>

about.pl
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt

index daf6829..3296182 100755 (executable)
--- a/about.pl
+++ b/about.pl
@@ -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 = ();
index 620dd35..32d87c5 100644 (file)
         </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>