mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 12:18:43 +09:00
Prevent actions on hosting services with bad order status (#1521)
This commit is contained in:
1 parent
409fe5a5f9
commit
6ecb90628f
1 file changed
+10
-2
@@ -379,9 +379,17 @@ class Service implements InjectionAwareInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
private function _performOnService(\Model_ClientOrder $order)
|
||||
private function _performOnService(\Model_ClientOrder $order): bool
|
||||
{
|
||||
return $order->status != \Model_ClientOrder::STATUS_FAILED_SETUP;
|
||||
// If the order matches any of the following status, we should prevent actions such as PW resets or username changes from being performed
|
||||
$badStatus = [
|
||||
\Model_ClientOrder::STATUS_FAILED_SETUP,
|
||||
\Model_ClientOrder::STATUS_PENDING_SETUP,
|
||||
\Model_ClientOrder::STATUS_SUSPENDED,
|
||||
\Model_ClientOrder::STATUS_CANCELED,
|
||||
];
|
||||
|
||||
return !in_array($order->status, $badStatus);
|
||||
}
|
||||
|
||||
private function _getServerMangerForOrder($model)
|
||||
|
||||
Reference in new issue
Block a user