commit21
This commit is contained in:
@@ -29,7 +29,7 @@ class AutomaticPurchases
|
||||
|
||||
public function canReview(User $actor, SupplyRecord $rule, string $action = 'approve'): bool
|
||||
{
|
||||
if ($actor->tenant_id !== $rule->tenant_id || $rule->kind !== 'auto_rule' || ! in_array($action, ['approve', 'suspend'], true)
|
||||
if (! $this->ready() || $actor->tenant_id !== $rule->tenant_id || $rule->kind !== 'auto_rule' || ! in_array($action, ['approve', 'suspend'], true)
|
||||
|| ! app(SupplyPlanning::class)->allows($actor, 'supply_review')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user