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
+3
View File
@@ -241,6 +241,9 @@ class PortalProfileAccess
public function canEdit(User $actor, Opportunity $record, ?string $newType = null): bool
{
if ($record->isPrivateOfferPreparation() && data_get($record->workflow_context, 'private_offer_preparation.state') !== 'draft') {
return false;
}
if ($record->owner_user_id === null) {
return $this->legacyWriteAllowed($actor);
}