Skip to content

Commit

Permalink
Merge pull request #27 from Flowpack/bugfix-full-release
Browse files Browse the repository at this point in the history
BUGFIX: Fix access to uninitialized security context during full publish
  • Loading branch information
JamesAlias authored May 15, 2023
2 parents de4e90e + a248f91 commit 3b7b9f3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Classes/ContentReleaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public function startIncrementalContentRelease(string $currentContentReleaseId =
'currentContentReleaseId' => $currentContentReleaseId ?: self::NO_PREVIOUS_RELEASE,
'validate' => true,
'workspaceName' => $workspace ? $workspace->getName() : 'live',
'accountId' => $this->securityContext->getAccount()->getAccountIdentifier(),
'accountId' => $this->securityContext->isInitialized()
? $this->securityContext->getAccount()->getAccountIdentifier() :
null,
]));
return $contentReleaseId;
}
Expand All @@ -88,7 +90,9 @@ public function startFullContentRelease(bool $validate = true, string $currentCo
'currentContentReleaseId' => $currentContentReleaseId ?: self::NO_PREVIOUS_RELEASE,
'validate' => $validate,
'workspaceName' => $workspace ? $workspace->getName() : 'live',
'accountId' => $this->securityContext->getAccount()->getAccountIdentifier(),
'accountId' => $this->securityContext->isInitialized()
? $this->securityContext->getAccount()->getAccountIdentifier() :
null,
]));
return $contentReleaseId;
}
Expand Down

0 comments on commit 3b7b9f3

Please sign in to comment.