Bug 10300: Allow transferring of items to be have separate IndependentBranches syspref

Some libraries want to have IndependentBranches enabled, but still be
able to transfer items between themselves.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable IndpendentBranches and IndependentBranchesTransfers
4) Log in as a super librarian
5) Note you can transfer items
6) Log in as a non-super librarian
7) Note you cannot transfer items
8) Disable IndependentBranchesTransfers
9) Note you can now transfer items

Signed-off-by: Maribeth Shafer <mshafer@ckls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Bug 10300: (QA follow-up) Make database update idempotent

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Kyle Hall 2016-08-25 14:03:31 +00:00 committed by Nick Clemens
parent 428fcb3421
commit 6e6a6230a5
3 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,12 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
SELECT 'IndependentBranchesTransfers', value, NULL, 'Allow non-superlibrarians to transfer items between libraries','YesNo'
FROM systempreferences WHERE variable = 'IndependentBranches'
});
# Always end with this (adjust the bug info)
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 10300 - Allow transferring of items to be have separate IndependentBranches syspref)\n";
}

View file

@ -228,6 +228,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
('IndependentBranchesPatronModifications','0', NULL, 'Show only modification request for the logged in branch','YesNo'),
('IndependentBranchesTransfers','0', NULL, 'Allow non-superlibrarians to transfer items between libraries','YesNo'),
('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
('RecordedBooksClientSecret','','30','Client key for RecordedBooks integration','YesNo'),
('RecordedBooksDomain','','','RecordedBooks domain','Free'),

View file

@ -111,6 +111,13 @@ Administration:
choices:
yes: "Yes"
no: "No"
-
- Prevent staff (but not superlibrarians) from transfering items to other libraries
- pref: IndependentBranchesTransfers
default: 0
choices:
yes: "Yes"
no: "No"
CAS authentication:
-
- "Use CAS for login authentication: "