[Koha-bugs] [Bug 11781] New: Error after setting IndependentBranches to 0, that is, "prevent" (staff (but not superlibrarians) from modifying objects (holds, items, patrons, etc.) belonging to other libraries.)
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Feb 18 15:21:12 CET 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11781
Bug ID: 11781
Summary: Error after setting IndependentBranches to 0, that is,
"prevent" (staff (but not superlibrarians) from
modifying objects (holds, items, patrons, etc.)
belonging to other libraries.)
Change sponsored?: ---
Product: Koha
Version: 3.14
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: System Administration
Assignee: koha-bugs at lists.koha-community.org
Reporter: homer.richardson at yahoo.com
QA Contact: testopia at bugs.koha-community.org
CC: gmcharlt at gmail.com
The sequence below has happened twice so now i think it may be a bug, not a
personal failure.
Environment
3.14.03.000
OS version ('uname -a'): Linux ID13723.example.com 3.8.0-29-generic
#42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64
GNU/Linux
Perl interpreter: /usr/bin/perl
Perl version: 5.014002
Perl @INC: /usr/share/koha/lib
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl
.
MySQL version: mysql Ver 14.14 Distrib 5.5.35, for debian-linux-gnu
(x86_64) using readline 6.2
Apache version: Server version: Apache/2.2.22 (Ubuntu)
Zebra version: Zebra 2.0.44
What happens
I set IndependentBranches to "prevent" using the admin interface. Immediately
after setting the preference, everything works fine. In fact i work on koha
configuration for the rest of the day, log off and back on several times and
everything is fine. However, the next day (perhaps because the crons have run
overnight) when i try to access the intranet, i get this error.
Software error:
Can't use an undefined value as a HASH reference at
/usr/share/koha/intranet/cgi-bin/mainpage.pl line 53.
For help, please send mail to the webmaster ([no address given]), giving this
error message and the time and date of the error.
-----------
my $branch =
C4::Context->preference("IndependentBranches")
&& !$flags->{'superlibrarian'}
? C4::Context->userenv()->{'branch'}
: undef;
-----------
I log into the server and do the following
mysql> select * from systempreferences where variable="IndependentBranches";
+---------------------+-------+---------+---------------------------------------------+-------+
| variable | value | options | explanation
| type |
+---------------------+-------+---------+---------------------------------------------+-------+
| IndependentBranches | 1 | NULL | If ON, increases security between
libraries | YesNo |
+---------------------+-------+---------+---------------------------------------------+-------+
1 row in set (0.00 sec)
mysql> update systempreferences set value=0 where
variable="IndependentBranches";
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0
This fixes it, and lets me enter the intranet but strangely i enter logged in
as an OPAC user (who does not have permission to enter the intranet area). I
only have one OPAC user created by the way, and obviously was not previously
logged in as that user in the intranet but i may have been logged in as that
user in the OPAC. If i log out and try to sign in as that same OPAC user again,
it correctly gives me the message that i do not have permission to access that
page.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list