Browse Source

Bug 25482: Wrong permissions specification for adv editor macros

The current permissions are defined as a hash, with a duplicate key.
This is generally invalid, but Debian 9's Mojolicious::Plugin::OpenAPI
lets it go through, even though the results are, random?

This patch sets the required permissions right, and following the
haspermissions() syntax correctly.

Tests for searching macros are not passing. Still trying to figure.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Tomás Cohen Arazi 4 years ago
committed by Martin Renvoize
parent
commit
810e761660
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 18
      api/v1/swagger/paths/advancededitormacros.json

18
api/v1/swagger/paths/advancededitormacros.json

@ -178,8 +178,10 @@
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor",
"editcatalogue": "create_shared_macros"
"editcatalogue": {
"advanced_editor": 1,
"create_shared_macros": 1
}
}
}
}
@ -457,8 +459,10 @@
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor",
"editcatalogue": "create_shared_macros"
"editcatalogue": {
"advanced_editor": 1,
"create_shared_macros": 1
}
}
}
},
@ -512,8 +516,10 @@
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor",
"editcatalogue": "delete_shared_macros"
"editcatalogue": {
"advanced_editor": 1,
"delete_shared_macros": 1
}
}
}
}

Loading…
Cancel
Save