Main Koha release repository
https://koha-community.org
Tomas Cohen Arazi
b97158dd13
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> |
||
---|---|---|
acqui | ||
admin | ||
api/v1 | ||
authorities | ||
basket | ||
C4 | ||
catalogue | ||
cataloguing | ||
circ | ||
clubs | ||
course_reserves | ||
debian | ||
docs | ||
errors | ||
etc | ||
ill | ||
installer | ||
Koha | ||
koha-tmpl | ||
labels | ||
members | ||
misc | ||
offline_circ | ||
opac | ||
patron_lists | ||
patroncards | ||
plugins | ||
pos | ||
reports | ||
reserve | ||
reviews | ||
rotating_collections | ||
serials | ||
services | ||
skel | ||
suggestion | ||
svc | ||
t | ||
tags | ||
tmp/modified_authorities | ||
tools | ||
virtualshelves | ||
xt | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.htaccess | ||
.mailmap | ||
.scss-lint.yml | ||
about.pl | ||
changelanguage.pl | ||
cpanfile | ||
fix-perl-path.PL | ||
gulpfile.js | ||
help.pl | ||
INSTALL | ||
Koha.pm | ||
koha_perl_deps.pl | ||
kohaversion.pl | ||
LICENSE | ||
mainpage.pl | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
package.json | ||
README | ||
README.md | ||
README.robots | ||
rewrite-config.PL | ||
yarn.lock |
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