From 75d4053ef73205e2730d5005a33dc787d311b5e3 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Thu, 20 Apr 2017 12:09:37 +0000 Subject: [PATCH] Bug 17047 security token agst flooding for Mana-KB Rework messages from Mana-KB. - Add A syspref contains an authentication token. The token will be used to prevent anaonymous flooding of Mana-KB - To get an Authentication token, you have to fill a form and validate your e-mail address - Messages return codes are now correctly displayed and there shouldn't be any crash when Mana-KB webservices return a wrong answer or doesn't answer Test plan: 1 - Apply Patch + update database 2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after for example) https://mana-kb.koha-community.org 3 - Check Mana syspref and AutoShareWithMana syspref are not activated 4 - Search the syspref ManaToken and follow the instructions 5 - subscriptions - Try create a new subscription for a first serial => Mana-KB shouldn't show you anything (except if the base hase been filled) - Share this serial with Mana-KB (on the serial individual's page there must be a Share button) - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear - Activate AutoShareWithMana => Subscriptions - Create a new subscription for a second serial - There shouldn't be any Share button - Create a second subscription => the message should appear, click again on use 6 - SQL Report - Create a new SQL report, without notes. - On the table with all report (reports > use saved), there should be the action "Share" - If you click on share, you have an error message - Create a new report, with a title and notes longer than 20 characters - You can share it with mana => you will have a success message - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list. 7 - Report mistakes. - On any table containing Mana-KB search results, you can report a mistake and add a comment. 8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message. --- koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index 2f80be3..dcbbe3c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -413,6 +413,7 @@ function mana_search() { dataType: "html", }) .done( function( result ) { +console.log(result); $("#mana_search_result .modal-body").html(result); $("#mana_search_result_label").text("Results from Mana Knowledge Base"); $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, { -- 2.7.4