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)
mr9.5.9
Marco Capetta 2 years ago
parent fa03daaeab
commit 919e9a5f0d

@ -418,6 +418,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