[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 30 15:53:33 CEST 2016


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

--- Comment #18 from Johanna Räisä <johanna.raisa at gmail.com> ---
Created attachment 52993
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52993&action=edit
[SIGNED-OFF] Bug 14868: Give users possibility to request their own object

If the user has no required permissions, but attempts to access his own object,
allow this request in case "x-koha-permission" has defined "allow-owner": "1".

As an example, the following resource can be accessed if user has
borrowers-flag
or if he is making the request to his own borrowernumber (in path or body):

"/patrons/{borrowernumber}": {
  ..
  "x-koha-permission": {
    "allow-owner": "1",
    "permissions": {
      "borrowers": "1"
    }
  }
}

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi>

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa <johanna.raisa at gmail.com>

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

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


More information about the Koha-bugs mailing list