feat: prepare private offers through existing opportunities

This commit is contained in:
2026-11-14 13:41:31 +02:00
parent e8408c27d9
commit 1f2990e4da
17 changed files with 1211 additions and 26 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ final class OpportunityPromotion
public function allowed(User $actor, Opportunity $record): bool
{
$access = app(PortalProfileAccess::class);
if ($record->trashed() || $record->owner_user_id === null || ! $access->canView($actor, $record)
if ($record->isPrivateOfferPreparation() || $record->trashed() || $record->owner_user_id === null || ! $access->canView($actor, $record)
|| $access->has($actor, 'auditor') || in_array($record->status, ['archived', 'rejected'], true)) {
return false;
}