From b4d61565d2d8ef144bc9274a93145fd68ee9e955 Mon Sep 17 00:00:00 2001 From: Flaviu Mates Date: Fri, 26 Mar 2021 10:58:44 +0200 Subject: [PATCH] TT#114703 Use config flags password_(sip|web)_expose_subadmin in api Change-Id: I289a3683c09c098d52c1ddb5a489c8c2093f9c99 (cherry picked from commit 67ca4d5a00b79d87ae603858d795c86b468ca724) --- lib/NGCP/Panel/Role/API/Subscribers.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/NGCP/Panel/Role/API/Subscribers.pm b/lib/NGCP/Panel/Role/API/Subscribers.pm index 5762d72a2d..2ffcbdc630 100644 --- a/lib/NGCP/Panel/Role/API/Subscribers.pm +++ b/lib/NGCP/Panel/Role/API/Subscribers.pm @@ -188,6 +188,12 @@ sub resource_from_item { } if($c->user->roles eq "subscriberadmin") { $resource{customer_id} = $contract_id; + if(!$c->config->{security}->{password_sip_expose_subadmin}) { + delete $resource{password}; + } + if(!$c->config->{security}->{password_web_expose_subadmin}) { + delete $resource{webpassword}; + } } }