Bug 16805: Log in with database admin user breaks OPAC
commite45ed6d2f477aa9a85750c0f7c2a4df1af50e94f
authorMark Tompsett <mtompset@hotmail.com>
Thu, 23 Jun 2016 18:51:26 +0000 (23 14:51 -0400)
committerFrédéric Demians <f.demians@tamil.fr>
Mon, 1 Aug 2016 09:31:06 +0000 (1 11:31 +0200)
treee4df253f1985da67bbad69f7ae976bf6949b6363
parent946764c470a767439d65b463a4db9b2fdb0b58c4
Bug 16805: Log in with database admin user breaks OPAC

TEST PLAN
---------
1) Apply Jonathan's test patch
2) prove t/db_dependent/Letters.t
   -- dies before finishing tests
3) Apply second test patch
4) prove t/db_dependent/Letters.t
   -- dies before finishing tests
   -- 'addalert' is changed to 'getalert'
5) Log into OPAC with database admin user.
   -- see error given in comment #0
6) Apply this patch
7) prove t/db_dependent/Letters.t
   -- says 'getalert'
   -- all tests pass.
8) Log into OPAC with database admin user.
   -- logs in, but gives warning with a nice logout button.
9) run koha qa test tools.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
No kaha qa errors
In debian display diferent error:
Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/DBI.pm line 2054.
Works as advertised

NOTE: Revised test plan, as Jonathan added useful test case.
      Works as I've tested above.
      Hector tested older test plan which was steps
      5,6,8 and 9.

      Revised test plan again while tweaking to address comment #9.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dee29d9f0b2b43bc762cb82a2212cd8a3d243f45)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
C4/Letters.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
opac/opac-user.pl