[Koha-bugs] [Bug 25482] Wrong permissions in spec break Plack on Debian 10

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 14 00:13:58 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25482

--- Comment #4 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Tomás Cohen Arazi from comment #1)
> Found the issue. It took me a while....
> 
> The thing is, the JSON::Validator/openAPI plugin combination we have in D9
> is very loose, and doesn't catch a problem in the Advanced editor macros
> routes spec. Basically, there are routes that have:
> 
> x-koha-permission: {
>     editcatalogue => 'advanced_editor',
>     editcatalogue => 'delete_shared_macros',
> }
> 
> which is basically invalid, as you shouldn't be able to define a hash with
> two values for the same key.
> 
> My first attempt was to just to the expected thing:
> 
> x-koha-permission: {
>     "editcatalogue" =>  [
>         'advanced_editor',
>         'delete_shared_macros'
>      ]
> }
> 
> This should work, but it doesn't really.

That syntax is wrong, the attached patch puts the right one.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list