Koha-clms/Koha/REST/V1
Tomas Cohen Arazi 5a5d1b8089 Bug 26322: Permissions not checked correctly for plugins
This patch fixes the logic in a condition to address the fact that
permissions are not checked for plugins. This was due to bad parenthesis
pairing and the lack of good tests for this.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
=> FAIL: Tests fail because of bad logic
3. Apply this patch
4. Repeat (2)
=> SUCCESS: Tests pass!
5. Verify the tests cover the use cases that are needed:
   - Anonymous access
   - Real user with wrong permissions (parameters => 1)
   - Real user with right permissions (borrowers => 1)
=> SUCCESS: Needed use cases so we catch any regression are found
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 66402643d7cb95bf5ebc4832bff61becfa3d5a6a)
2020-09-22 23:12:43 +00:00
..
Acquisitions Bug 25048: Make successful resource deletion return 204 2020-04-29 16:24:43 +01:00
Clubs Bug 23820: Add checkout to default to patron's home branch on club hold 2020-07-27 16:40:08 +00:00
Patrons Bug 25032: Make existing controllers use unhandled_exception 2020-04-29 16:24:18 +01:00
AdvancedEditorMacro.pm Bug 25502: Adapt Advanced macros routes to current guidelines 2020-05-19 15:21:16 +01:00
Auth.pm Bug 26322: Permissions not checked correctly for plugins 2020-09-22 23:12:43 +00:00
Biblios.pm Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id} 2020-04-29 17:13:36 +01:00
Checkouts.pm Bug 25032: Make existing controllers use unhandled_exception 2020-04-29 16:24:18 +01:00
CirculationRules.pm Bug 18936: (QA follow-up) Add missing POD 2020-02-04 09:56:30 +00:00
Cities.pm Bug 25048: Make successful resource deletion return 204 2020-04-29 16:24:43 +01:00
Holds.pm Bug 25662: Make the route for holds restpect maxreserves 2020-09-04 20:10:31 +00:00
Illbackends.pm Bug 22615: Fix perlcritic 2020-03-05 13:03:46 +00:00
Illrequests.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Items.pm Bug 25032: Make existing controllers use unhandled_exception 2020-04-29 16:24:18 +01:00
Libraries.pm Bug 25032: Make existing controllers use unhandled_exception 2020-04-29 16:24:18 +01:00
OAuth.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Patrons.pm Bug 23634: (QA follow-up) Our PUT is really a PATCH 2020-08-31 20:01:53 +00:00
ReturnClaims.pm Bug 25032: Make existing controllers use unhandled_exception 2020-04-29 16:24:18 +01:00
Stage.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Static.pm Bug 20415: Remove UseKohaPlugins system preference 2020-03-26 11:42:02 +00:00