From 39e81ebbe0e70e91b2d360405f765e40b352bdc2 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Fri, 22 Mar 2019 14:57:55 +0100 Subject: [PATCH] TT#55873 Only expose marked sound handles to customers Change-Id: I6feeef54e7dfed89a982fed4fbfcc386fd759266 --- lib/NGCP/Panel/Role/API/SoundHandles.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/NGCP/Panel/Role/API/SoundHandles.pm b/lib/NGCP/Panel/Role/API/SoundHandles.pm index fd3a21701f..854a0fd668 100644 --- a/lib/NGCP/Panel/Role/API/SoundHandles.pm +++ b/lib/NGCP/Panel/Role/API/SoundHandles.pm @@ -22,6 +22,13 @@ sub _item_rs { as => [qw/id handle group/], join => 'group', }); + if ($c->user->roles eq 'subscriberadmin' || + $c->user->roles eq 'subscriber') { + + $item_rs = $item_rs->search({ + expose_to_customer => 1, + }); + } return $item_rs; }