Koha-clms/Koha/REST
Tomas Cohen Arazi 57bb4ee95e Bug 26322: [19.11.x] 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: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-22 10:15:23 +12:00
..
Plugin Bug 26143: Make the API handle per_page=-1 2020-08-17 09:49:32 +12:00
V1 Bug 26322: [19.11.x] Permissions not checked correctly for plugins 2020-09-22 10:15:23 +12:00
V1.pm Revert "Bug 22026: Removed 'use Modern::Perl;' from Koha::REST::classes" 2019-02-26 11:04:08 -05:00