mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Use new ValidTheme constraint on theme field.
The old choice constraint needed an const, which is not available anymore, as you can configure the themes via parameters
This commit is contained in:
parent
f1c3a52c8a
commit
3c3a03a179
4 changed files with 92 additions and 1 deletions
|
@ -29,6 +29,7 @@ use App\Entity\PriceInformations\Currency;
|
|||
use App\Security\Interfaces\HasPermissionsInterface;
|
||||
use App\Validator\Constraints\Selectable;
|
||||
use App\Validator\Constraints\ValidPermission;
|
||||
use App\Validator\Constraints\ValidTheme;
|
||||
use Jbtronics\TFAWebauthn\Model\LegacyU2FKeyInterface;
|
||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
use Webauthn\PublicKeyCredentialUserEntity;
|
||||
|
@ -77,7 +78,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
|||
/**
|
||||
* @var string|null The theme
|
||||
* @ORM\Column(type="string", name="config_theme", nullable=true)
|
||||
* @Assert\Choice(choices=User::AVAILABLE_THEMES)
|
||||
* @ValidTheme()
|
||||
*/
|
||||
protected ?string $theme = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue