Bug 17268: Use API to store/retrieve values
authorNick Clemens <nick@bywatersolutions.com>
Tue, 3 Mar 2020 13:14:03 +0000 (13:14 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 4 May 2020 07:25:41 +0000 (08:25 +0100)
commit1ed4cc6540e48da584763ed24d5571608d14cf61
treed0f0449ba169fcb1b4d54ed7804592ea5536ba38
parent537ba245eed721d645387b840d6dbffaf98d57df
Bug 17268: Use API to store/retrieve values

To test:
 1  - Enable AdvancedCatalogingEditor
 2  - Add some macros (they don't need to be valid, just have content)
 3  - Apply patches
 4  - updatedatabase
 5  - Set user to have 'create_shared_macros' and 'delete_shared_macros'
 6  - Load the advanced editor (Cataloging->Advanced editor)
 7  - Click on 'Macros'
 8  - Previous macros should not show, but you should have a 'Convert' button
 9  - Convert old macros and confirm they show
10  - Edit the macros, changing content and the public checkbox, confirm 'Saved' shows in the top right of editor when updating
11  - Have at least on valid macro and run it, e.g.:
    new 100=Testing this out
12  - Run the macro, confirm it runs
13  - Try a macro with gibberish, confirm there is an error when running
14  - Ensure you have a few macros marked public
15  - In a private browser window sign in as a patron with neither shared macro permission
16  - Confirm the public macros load, but cannot be edited
17  - Grant create_shared_macros permission to this patron
18  - Reload editor, they should now be able to edit shared macros
19  - Confirm they cannot delete shared macros
20  - Grant delete_shared_macros permission
21  - Reload editor
22  - Confirm they can now delete shared macros

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Heather Hernandez <Heather_Hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/REST/V1/AdvancedEditorMacro.pm
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt