Koha/t
Martin Renvoize ed6791d64e
Bug 29523: Add redaction for inaccessible objects
This patch switches from removing inaccessible items from the responses
to instead redacting fields in innaccessible responses.

This allows for embed traversal and keeps counts etc correct but also
hides the data we want to hide.

We add support for an 'unredact_list' method at the Koha::* class level
allowing for individual classes to specify which fields they wish to
expose to restricted users regardless of their restriction.

It is to be used in combination with the is_accessible method introduced
earlier in this patchset which is used to denote whether the current
user should be allowed to see the full record or only a subset of it as
defined in the unredacted_list.

We undefine any fields not listed in the unredact_list for the API
response. This has the effect of still returning the full object of
keys, but setting most fields to a JSON null.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-27 16:40:46 -03:00
..
Acquisition
Biblio
Budgets
Circulation
cypress Bug 30708: Fix Trains.ts tests 2023-10-18 15:41:56 -03:00
data
db_dependent Bug 29523: Add redaction for inaccessible objects 2023-10-27 16:40:46 -03:00
edi_testfiles
etc
External
Koha Bug 34828: Add Koha::Biblio::Metadata::Extractor::MARC 2023-10-09 16:41:31 -03:00
lib Bug 33245: TestBuilder: Default value for anonymized 2023-10-04 11:07:48 -04:00
Number
Search Bug 34969: Remove unneeded module from buildQuery.t 2023-10-04 09:15:42 -04:00
Serials
SIP
Template
Test
00-check-atomic-updates.t
00-deprecated.t
00-load.t
00-merge-conflict-markers.t
00-testcritic.t Bug 34911: Test files from HEAD instead of 'master' 2023-10-04 09:15:35 -04:00
00-valid-xml.t
Auth.t
AuthoritiesMarc_MARC21.t
AuthoritiesMarc_UNIMARC.t
Barcodes_annual.t
Barcodes_EAN13.t
Barcodes_hbyymmincr.t
Barcodes_incremental.t
Biblio.t
Biblio2.t
Budgets.t
Charset.t
Circulation_barcodedecode.t
ClassSortRoutine.t
ClassSortRoutine_Dewey.t
ClassSortRoutine_Generic.t
ClassSortRoutine_LCC.t
ClassSource.t
Context.t Bug 29033: Add C4::Context->multivalue_preference 2023-10-10 10:53:59 -03:00
Contract.t
CookieManager.t
Creators.t
DateUtils.t
dummy.t
Edifact.t
EdiInvoice.t
Ediorder.t
Ediordrsp.t
Form_MessagingPreferences.t
HtmlTags.t
ImportBatch.t
Installer_PerlModules.t
ItemCirculationAlertPreference.t
Koha_MetadataRecord.t
Koha_SearchEngine_Elasticsearch_Browse.t
Koha_Template_Plugin_Cache.t
Koha_Template_Plugin_HtmlId.t
Koha_Template_Plugin_Koha.t
Koha_Util_FrameworkPlugin.t
Koha_Util_MARC.t
Koha_XSLT_HTTPS.t
Labels.t
Labels_split_ccn.t
Labels_split_ddcn.t
Labels_split_lccn.t
Labels_split_Regex.t
Languages.t
Logger.t
Makefile.t
Members_Messaging.t
OpenLibrarySearch.t
Output.t
Output_JSONStream.t
Patroncards.t
Patroncards_Batch.t
Patroncards_Lib.t
Patroncards_Patroncard.t
Patroncards_Profile.t
Patroncards_Template.t
RecordProcessor.t
Ris.t
Scheduler.t
Scrubber.t
Search.t Bug 34968: Remove unneeded module from Search.t 2023-10-04 09:32:46 -04:00
Search_PazPar2.t
SimpleMARC.t
SMS.t
SuggestionEngine.t
SuggestionEngine_AuthorityFile.t Bug 34970: Remove most modules from SuggestionEngine_AuthorityFile.t 2023-10-04 09:15:41 -04:00
template_filters.t
timezones.t
TmplToken.t
Token.t