From ca48aa2550a77cdc8678abbe2a144dadb9578090 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 28 Feb 2023 17:54:16 +0000 Subject: [PATCH] Bug 32968: ERM granular permissions - API specs Signed-off-by: Jonathan Field --- api/v1/swagger/paths/erm_agreements.yaml | 24 +++++++++++---- api/v1/swagger/paths/erm_documents.yaml | 6 +++- .../swagger/paths/erm_eholdings_packages.yaml | 28 ++++++++++++++---- .../erm_eholdings_packages_resources.yaml | 6 +++- .../paths/erm_eholdings_resources.yaml | 16 ++++++++-- .../swagger/paths/erm_eholdings_titles.yaml | 29 +++++++++++++++---- .../paths/erm_eholdings_titles_resources.yaml | 6 +++- api/v1/swagger/paths/erm_licenses.yaml | 24 +++++++++++---- api/v1/swagger/paths/erm_users.yaml | 6 +++- 9 files changed, 116 insertions(+), 29 deletions(-) diff --git a/api/v1/swagger/paths/erm_agreements.yaml b/api/v1/swagger/paths/erm_agreements.yaml index 289bc36a13..9ab2ab1a61 100644 --- a/api/v1/swagger/paths/erm_agreements.yaml +++ b/api/v1/swagger/paths/erm_agreements.yaml @@ -104,7 +104,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_agreement + - erm_eholdings post: x-mojo-to: ERM::Agreements#add operationId: addErmAgreements @@ -164,7 +168,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_agreement "/erm/agreements/{agreement_id}": get: x-mojo-to: ERM::Agreements#get @@ -227,7 +233,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_agreement + - erm_eholdings put: x-mojo-to: ERM::Agreements#update operationId: updateErmAgreements @@ -298,7 +308,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_agreement delete: x-mojo-to: ERM::Agreements#delete operationId: deleteErmAgreements @@ -344,4 +356,6 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_agreement diff --git a/api/v1/swagger/paths/erm_documents.yaml b/api/v1/swagger/paths/erm_documents.yaml index 31ea135413..6039864b73 100644 --- a/api/v1/swagger/paths/erm_documents.yaml +++ b/api/v1/swagger/paths/erm_documents.yaml @@ -43,4 +43,8 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_licensing + - erm_agreement diff --git a/api/v1/swagger/paths/erm_eholdings_packages.yaml b/api/v1/swagger/paths/erm_eholdings_packages.yaml index 51899e3316..2a44008e3d 100644 --- a/api/v1/swagger/paths/erm_eholdings_packages.yaml +++ b/api/v1/swagger/paths/erm_eholdings_packages.yaml @@ -101,7 +101,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_eholdings + - erm_agreement post: x-mojo-to: ERM::EHoldings::Packages#add operationId: addErmEHoldingsPackages @@ -162,7 +166,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings "/erm/eholdings/{provider}/packages/{package_id}": get: x-mojo-to: ERM::EHoldings::Packages#get @@ -222,7 +228,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_eholdings + - erm_agreement put: x-mojo-to: ERM::EHoldings::Packages#update operationId: updateErmEHoldingsPackages @@ -291,7 +301,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings delete: x-mojo-to: ERM::EHoldings::Packages#delete operationId: deleteErmEHoldingsPackages @@ -342,7 +354,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings patch: x-mojo-to: ERM::EHoldings::Packages#edit operationId: editErmEHoldingsPackages @@ -403,4 +417,6 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings diff --git a/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml b/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml index 696f495857..4c6529edc9 100644 --- a/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml +++ b/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml @@ -79,4 +79,8 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_eholdings + - erm_agreement diff --git a/api/v1/swagger/paths/erm_eholdings_resources.yaml b/api/v1/swagger/paths/erm_eholdings_resources.yaml index a824ed6491..d24e80ef12 100644 --- a/api/v1/swagger/paths/erm_eholdings_resources.yaml +++ b/api/v1/swagger/paths/erm_eholdings_resources.yaml @@ -78,7 +78,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_eholdings + - erm_agreement "/erm/eholdings/{provider}/resources/{resource_id}": get: x-mojo-to: ERM::EHoldings::Resources#get @@ -137,7 +141,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_eholdings + - erm_agreement patch: x-mojo-to: ERM::EHoldings::Resources#edit operationId: editErmEHoldingsResources @@ -198,4 +206,6 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings diff --git a/api/v1/swagger/paths/erm_eholdings_titles.yaml b/api/v1/swagger/paths/erm_eholdings_titles.yaml index 152fb7f8ce..d79276a145 100644 --- a/api/v1/swagger/paths/erm_eholdings_titles.yaml +++ b/api/v1/swagger/paths/erm_eholdings_titles.yaml @@ -188,7 +188,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_eholdings + - erm_agreement post: x-mojo-to: ERM::EHoldings::Titles#add operationId: addErmEHoldingsTitles @@ -249,7 +253,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings "/erm/eholdings/{provider}/titles/{title_id}": get: x-mojo-to: ERM::EHoldings::Titles#get @@ -307,7 +313,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_eholdings + - erm_agreement put: x-mojo-to: ERM::EHoldings::Titles#update operationId: updateErmEHoldingsTitles @@ -376,7 +386,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings delete: x-mojo-to: ERM::EHoldings::Titles#delete operationId: deleteErmEHoldingsTitles @@ -427,7 +439,10 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings + /erm/eholdings/local/titles/import: post: x-mojo-to: ERM::EHoldings::Titles#import_from_list @@ -493,4 +508,6 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_eholdings diff --git a/api/v1/swagger/paths/erm_eholdings_titles_resources.yaml b/api/v1/swagger/paths/erm_eholdings_titles_resources.yaml index d5ce1e62d0..0b6f05e5e9 100644 --- a/api/v1/swagger/paths/erm_eholdings_titles_resources.yaml +++ b/api/v1/swagger/paths/erm_eholdings_titles_resources.yaml @@ -79,4 +79,8 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_eholdings + - erm_agreement \ No newline at end of file diff --git a/api/v1/swagger/paths/erm_licenses.yaml b/api/v1/swagger/paths/erm_licenses.yaml index 97a6752798..e050941af7 100644 --- a/api/v1/swagger/paths/erm_licenses.yaml +++ b/api/v1/swagger/paths/erm_licenses.yaml @@ -87,7 +87,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_licensing + - erm_agreement post: x-mojo-to: ERM::Licenses#add operationId: addERMLicenses @@ -147,7 +151,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_licensing "/erm/licenses/{license_id}": get: x-mojo-to: ERM::Licenses#get @@ -202,7 +208,11 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_licensing + - erm_agreement put: x-mojo-to: ERM::Licenses#update operationId: updateERMlicenses @@ -270,7 +280,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_licensing delete: x-mojo-to: ERM::Licenses#delete operationId: deleteERMlicenses @@ -316,4 +328,6 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_licensing diff --git a/api/v1/swagger/paths/erm_users.yaml b/api/v1/swagger/paths/erm_users.yaml index 8d9bb05023..2822088690 100644 --- a/api/v1/swagger/paths/erm_users.yaml +++ b/api/v1/swagger/paths/erm_users.yaml @@ -55,5 +55,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - erm: 1 + erm: + - erm_admin + - erm_show + - erm_licensing + - erm_agreement -- 2.30.2