Bugzilla – Attachment 13202 Details for
Bug 9008
Warn if librarian logged-in with mysql/admin account
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9008: warn if user is logged-in with admin account
Bug-9008-warn-if-user-is-logged-in-with-admin-acco.patch (text/plain), 1.93 KB, created by
Jared Camins-Esakov
on 2012-11-02 11:59:03 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9008: warn if user is logged-in with admin account
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-11-02 11:59:03 UTC
Size:
1.93 KB
patch
obsolete
>From 263135f2f1b8d1310533d64c98c9be2b333c9a2d Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Fri, 2 Nov 2012 12:49:32 +0100 >Subject: [PATCH] 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> >--- > .../intranet-tmpl/prog/en/modules/intranet-main.tt | 7 +++++++ > mainpage.pl | 7 +++++++ > 2 files changed, 14 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index 38658dd..e1fe25e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -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 ) %] >diff --git a/mainpage.pl b/mainpage.pl >index f834985..78daf38 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -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; >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9008
:
13201
| 13202 |
13216
|
13243