Go to file
Tomas Cohen Arazi f1ca5b7473 Bug 24909: Add unprivileged route to get a bibliographic record
This patch adds a route to get bibliographic records without privileged
access. This needs to match the OPAC expected behaviour.

Some things were considered on the implementation:
- The ViewPolicy filter that hides/shows things based on the frameworks
  needded to be used, as in the OPAC.
- OpacHiddenItems and OpacHiddenItemsExceptions need to be considered
  for hiding records the same way the OPAC is expected to.
- Avoid using OpacHiddenItemsExceptions, but rely on the patron category
  instead (use Koha::Patron::Category->override_hidden_items abstraction
  is used instead so it should keep working once 22547 is moved
  forward).
- Tests should cover all the use cases:
  * logged in user
  * anonymous user
  * logged in with category that overrides
  * logged in with category that doesn't override

This is all implemented on the tests.

To test:
1. Apply the tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Route not implemented
3. Apply the rest of the patches
4. Repeat 2
=> SUCCESS: Tests pass!
5. Try it with your favourite API tool (Postman?)
6. Sign off :-D

Note: please notice there isn't a default fallback behaviour for when
you don't specify the Accept header, so testing this on a regular
browser will just print the accepted mime types instead of the record
itself.

To test this with a tool (like Postman) you should enable
RESTBasicAuthe and make the tool use Basic authentication with valid
credentials. And you need to specify any of the following strings on the
Accept header:
- application/marcxml+xml
- application/marc-in-json
- application/marc
- text/plain

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b97158dd13)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-06-15 10:38:33 +12:00
C4 Bug 24413: Do not remove the restrictions from AddReturn 2020-06-11 22:01:36 +00:00
Koha Bug 24909: Add unprivileged route to get a bibliographic record 2020-06-15 10:38:33 +12:00
OpenILS
…
acqui Bug 25223: Make join of aqbasket and aqorders explicit 2020-05-07 21:57:30 +00:00
admin Bug 25601: (bug 18928 follow-up) Fix "Unset" for "return policy for $branch" 2020-06-12 03:43:03 +00:00
api/v1 Bug 24909: Route spec 2020-06-15 10:32:28 +12:00
authorities Bug 25428: Correctly encode link if authority subfield is a URL 2020-06-09 05:06:03 +00:00
basket Bug 11529: Add templates for biblio title display. Unify display. 2019-08-05 15:03:19 +01:00
catalogue Bug 5103: Refactor the code to avoid repetition 2020-04-03 17:26:54 +00:00
cataloguing Bug 25335: group by authorised_value in addbiblio.pl 2020-05-11 20:26:16 +00:00
circ Bug 24612: Make hold-transfer-slip take reserve_id 2020-06-11 04:59:23 +00:00
clubs
…
course_reserves Revert "Bug 23727: Editing course reserve items is broken" 2020-05-19 23:46:46 +00:00
debian Bug 25618: Fix wrong package install path for misc dir 2020-06-15 10:09:00 +12:00
docs Corrections to teams for 20.05 cycle 2019-11-29 12:10:34 +00:00
errors Bug 23329: Move error page to its own subroutine 2019-11-27 11:30:19 +00:00
etc Bug 25277: Don't specify a field in query if none passed 2020-05-19 22:57:25 +00:00
ill Bug 21460: (follow-up) Fix bugs found in QA 2019-04-25 10:46:56 +00:00
installer Increment version for 19.11.06 release 2020-05-21 22:23:33 +00:00
koha-tmpl Bug 25473: Move JavaScript out of the footer of addorderiso2709.tt 2020-06-11 23:55:20 +00:00
labels Bug 21206: Replace C4::Items::GetItem 2019-02-26 13:24:07 +00:00
members Bug 25311: Better error handling when updating a patron 2020-05-19 23:51:04 +00:00
misc Update release notes for 19.11.06 release 2020-05-21 22:35:29 +00:00
offline_circ Bug 22600: Add 'interface' to accountlines 2019-04-10 19:43:11 +00:00
opac Bug 25416: Let OPAC XSLTs know if the context is an anonymous session 2020-05-20 20:44:57 +00:00
patron_lists
…
patroncards Bug 21719: Fix typos 2018-11-08 02:18:46 +00:00
plugins Bug 21073: (QA follow-up) Avoid unnecessary unless/else construct 2019-06-18 17:30:44 +01:00
reports Bug 24940: Serials statistics wizard: order vendor list alphabetically 2020-05-01 17:39:21 +00:00
reserve Bug 24802: Updating holds can cause suspensions to apply to wrong hold 2020-04-01 22:42:26 +00:00
reviews
…
rotating_collections Bug 21500: Remove warnings in rotating collections 2018-10-09 15:02:45 +00:00
serials Bug 25081: Fix wrong comment 2020-05-04 20:44:10 +00:00
services
…
skel
…
suggestion Bug 22868: Move suggestions_manage subperm out of acquisition perm 2020-02-10 23:08:59 +00:00
svc Bug 24964: [19.11.x] Do not filter patrons after they have been fetched 2020-04-29 15:57:56 +00:00
t Bug 24909: Unit tests 2020-06-15 10:28:07 +12:00
tags Bug 11529: Add templates for biblio title display. Unify display. 2019-08-05 15:03:19 +01:00
tmp/modified_authorities
…
tools Bug 25567: Fix typo categorycode vs category_code 2020-06-11 22:33:40 +00:00
virtualshelves Bug 11529: Add templates for biblio title display. Unify display. 2019-08-05 15:03:19 +01:00
xt Bug 21576: Keep compatibility with QA script 2018-10-26 17:09:52 +00:00
.editorconfig
…
.eslintrc.json Bug 23834: Add default ESLint configuration 2019-11-03 08:02:39 +00:00
.gitignore Bug 20427: Convert OPAC LESS to SCSS 2018-08-09 15:17:07 +00:00
.htaccess
…
.mailmap
…
.scss-lint.yml Bug 21237: Clean up staff client SCSS 2018-08-24 16:23:25 +00:00
INSTALL
…
Koha.pm Increment version for 19.11.06 release 2020-05-21 22:23:33 +00:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 24445: Add z3950 to makefile (bug 13937 follow-up) 2020-01-18 15:05:48 +00:00
README
…
README.md
…
README.robots
…
about.pl Bug 25506: Fix for "Use of uninitialized value" in about.pl 2020-06-09 03:13:10 +00:00
changelanguage.pl Bug 21299: (QA follow-up) Rename module and subroutine 2018-11-07 21:52:17 +00:00
fix-perl-path.PL
…
gulpfile.js Bug 21751: Replace fixFloat with HC-sticky to fix Chrome display 2019-02-04 14:13:35 +00:00
help.pl Bug 19817: Use the language from the interface if valid 2018-09-06 17:32:28 +00:00
koha_perl_deps.pl
…
kohaversion.pl
…
mainpage.pl Bug 21907: Fix article requests count for non-superlibrarians 2019-02-04 14:50:40 +00:00
package.json Bug 23025: security vulnerability detected in fstream < 1.0.12 defined in yarn.lock 2019-11-27 11:30:17 +00:00
rewrite-config.PL Bug 17851: Add elasticsearch config to koha-conf.xml 2019-10-07 14:09:10 +01:00
yarn.lock Bug 23025: Update yarn.lock 2019-11-27 11:30:17 +00:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo