MT#56301 Fix API creation of an active subscriber with lock

Using API is possibile to edit an existing subscriber and set
status: active and lock: 2.
It is instead impossbile to create a new subscriber with the same
configuration because the 'lock' param is not taken into account.
The only way to properly setup lock level it is to set the status
to 'locked' and this is in fact wrong.

The fix address this issue and allow now to create a new subscriber
with status: active and lock: 2.

Change-Id: Id18e40bc001c5a7de30f5d148231bda93a3b1b3d
(cherry picked from commit 8945b8a5ac)
(cherry picked from commit a31f0f0fba)
mr10.5.6
Marco Capetta 1 year ago
parent aeed2a57e4
commit 622919fe21

@ -412,6 +412,12 @@ sub POST :Allow {
);
} else {
NGCP::Panel::Utils::ProfilePackages::underrun_lock_subscriber(c => $c, subscriber => $subscriber);
NGCP::Panel::Utils::Subscriber::lock_provisoning_voip_subscriber(
c => $c,
prov_subscriber => $subscriber->provisioning_voip_subscriber,
level => $resource->{lock} || 0,
);
}
NGCP::Panel::Utils::Subscriber::update_subscriber_numbers(
c => $c,

Loading…
Cancel
Save