Skip to content

Commit

Permalink
TASK: Task rename Neos.Neos WorkspaceName to NeosWorkspaceName
Browse files Browse the repository at this point in the history
This will make it easier to import the correct Neos CR WorkspaceName - which one will want to use more likely.

Resolves partially #4341
  • Loading branch information
mhsdesign committed Sep 18, 2023
1 parent 96e4257 commit 307a83c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
use Neos\Diff\Diff;
use Neos\Diff\Renderer\Html\HtmlArrayRenderer;
use Neos\Neos\Controller\Module\ModuleTranslationTrait;
use Neos\Neos\Domain\Model\WorkspaceName as NeosWorkspaceName;
use Neos\Neos\Domain\Model\NeosWorkspaceName;
use Neos\Flow\Annotations as Flow;
use Neos\Error\Messages\Message;
use Neos\Flow\Mvc\ActionRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName as ContentRepositoryWorkspaceName;

/**
* The workspace name value for Neos contexts
* The workspace name with domain logic for Neos.Neos
* Directly translatable to CR workspace names
*/
final class WorkspaceName implements \JsonSerializable, \Stringable
final class NeosWorkspaceName implements \JsonSerializable, \Stringable
{
public const PREFIX = 'user-';
public const SUFFIX_DELIMITER = '_';
Expand Down Expand Up @@ -58,7 +58,7 @@ public function increment(array $takenWorkspaceNames): self
}

if ($i > 1) {
return new WorkspaceName($name);
return new self($name);
} else {
return $this;
}
Expand Down
4 changes: 2 additions & 2 deletions Neos.Neos/Classes/Service/EditorContentStreamZookeeper.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Neos\ContentRepositoryRegistry\Factory\ProjectionCatchUpTrigger\CatchUpTriggerWithSynchronousOption;
use Neos\Flow\Core\Bootstrap;
use Neos\Flow\Http\HttpRequestHandlerInterface;
use Neos\Neos\Domain\Model\WorkspaceName as AdjustmentsWorkspaceName;
use Neos\Neos\Domain\Model\NeosWorkspaceName;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Persistence\PersistenceManagerInterface;
use Neos\Flow\Security\Authentication;
Expand Down Expand Up @@ -106,7 +106,7 @@ public function relayEditorAuthentication(Authentication\TokenInterface $token):
if ($isEditor) {
$user = $this->partyService->getAssignedPartyOfAccount($token->getAccount());
if ($user instanceof User) {
$workspaceName = AdjustmentsWorkspaceName::fromAccountIdentifier(
$workspaceName = NeosWorkspaceName::fromAccountIdentifier(
$token->getAccount()->getAccountIdentifier()
);
$workspace = $contentRepository->getWorkspaceFinder()->findOneByName(
Expand Down
4 changes: 2 additions & 2 deletions Neos.Neos/Classes/Utility/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Neos\Neos\Utility;

use Neos\Neos\Domain\Model\WorkspaceName;
use Neos\Neos\Domain\Model\NeosWorkspaceName;

/**
* Utility functions for dealing with users in the Content Repository.
Expand All @@ -17,7 +17,7 @@ class User
*/
public static function getPersonalWorkspaceNameForUsername($username): string
{
return (string)WorkspaceName::fromAccountIdentifier($username);
return (string)NeosWorkspaceName::fromAccountIdentifier($username);
}

/**
Expand Down

0 comments on commit 307a83c

Please sign in to comment.