From 4828b02c20d1ce7fb5ef6d3463ec77def787c484 Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Wed, 7 Aug 2024 16:28:16 +0200 Subject: [PATCH] MT#59979 permit GET on resellers and billing profiles items even without license In some cases the UI requires to GET information from a specific reseller or billing profile because needed to show/created other endpoints (for example 'customers'). Due to that it has been added the possiiblity to do the GET not only of the list of the resellers and biling profiles, but also of each specific item. Change-Id: Iebbbbc494ce71e616d8e41ca20e97bebce7998b8 (cherry picked from commit a2a01d4690e8962fdf2c069563a4ce81a290c956) --- lib/NGCP/Panel/Controller/API/BillingProfilesItem.pm | 6 +++++- lib/NGCP/Panel/Controller/API/ResellersItem.pm | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/NGCP/Panel/Controller/API/BillingProfilesItem.pm b/lib/NGCP/Panel/Controller/API/BillingProfilesItem.pm index e66afff7f2..2d79088cd8 100644 --- a/lib/NGCP/Panel/Controller/API/BillingProfilesItem.pm +++ b/lib/NGCP/Panel/Controller/API/BillingProfilesItem.pm @@ -41,7 +41,11 @@ __PACKAGE__->set_config({ Default => [qw/admin reseller ccareadmin ccare/], Journal => [qw/admin reseller ccareadmin ccare/], }, - required_licenses => [qw/billing/], + required_licenses => { + PATCH => [qw/billing/], + PUT => [qw/billing/], + DELETE => [qw/billing/], + } }); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/ResellersItem.pm b/lib/NGCP/Panel/Controller/API/ResellersItem.pm index ce0390cdb2..900180d98f 100644 --- a/lib/NGCP/Panel/Controller/API/ResellersItem.pm +++ b/lib/NGCP/Panel/Controller/API/ResellersItem.pm @@ -40,7 +40,10 @@ __PACKAGE__->set_config({ Default => [qw/admin/], Journal => [qw/admin/], }, - required_licenses => [qw/reseller/], + required_licenses => { + PATCH => [qw/reseller/], + PUT => [qw/reseller/], + } }); sub GET :Allow {