-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: Extract workspace metadata and user-assignment to Neos
Introduces `WorkspacePublishingService` as replacement for the current Neos `Workspace` "active record" model. Introduces `WorkspaceService` as central authority to manage Neos workspaces. Related: #4726
- Loading branch information
1 parent
8cdcc5f
commit 5f1e296
Showing
33 changed files
with
1,265 additions
and
1,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\Neos\Domain\Model; | ||
|
||
/** | ||
* Globally unique identifier of a Neos user | ||
* | ||
* @api | ||
*/ | ||
final readonly class UserId implements \JsonSerializable | ||
{ | ||
public function __construct( | ||
public string $value | ||
) { | ||
if (!preg_match('/^([a-z0-9\-]{1,40})$/', $value)) { | ||
throw new \InvalidArgumentException(sprintf('Invalid user id "%s" (a user id must only contain lowercase characters, numbers and the "-" sign).', 1718293224)); | ||
} | ||
} | ||
|
||
public static function fromString(string $value): self | ||
{ | ||
return new self($value); | ||
} | ||
|
||
public function jsonSerialize(): string | ||
{ | ||
return $this->value; | ||
} | ||
|
||
public function equals(self $other): bool | ||
{ | ||
return $this->value === $other->value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.