Bug 9008: warn if user is logged-in with admin account
Test plan: * log-in staff interface with admin (mysql) account => there's a large warning on the homepage * log-in with another account => nothing displayed Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
62ce0ba1b0
commit
5293bb5540
|
|
@ -16,7 +16,14 @@
|
|||
<div id="bd" role="main">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b"><div class="yui-g">
|
||||
[% IF adminWarning %]
|
||||
<div id="adminwarning"i class="alert">
|
||||
<p>Warning: you're logged-in with the admin login. This a a bad idea, and you are likely to encounter problems.</p>
|
||||
<p>You should <a href="/cgi-bin/koha/members/memberentry.pl?op=add">create a patron</a> and give it superlibrarian permissions.</p>
|
||||
</div>
|
||||
[% END %]
|
||||
<div class="yui-u first">
|
||||
|
||||
<div id="area-list-left">
|
||||
<ul class="biglinks-list">
|
||||
[% IF ( CAN_user_circulate ) %]
|
||||
|
|
|
|||
|
|
@ -60,4 +60,11 @@ $template->param(
|
|||
pendingsuggestions => $pendingsuggestions
|
||||
);
|
||||
|
||||
#
|
||||
# warn user if he is using mysql/admin login
|
||||
#
|
||||
unless ($loggedinuser) {
|
||||
$template->param(adminWarning => 1);
|
||||
}
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
Loading…
Reference in New Issue