feat: improve security when delete

This commit is contained in:
Maël Gangloff 2024-08-16 17:10:59 +02:00
parent 8b47d6068c
commit 1c1821838f
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629
2 changed files with 6 additions and 2 deletions

View File

@ -32,7 +32,9 @@ use Symfony\Component\Uid\Uuid;
normalizationContext: ['groups' => ['connector:create', 'connector:list']], denormalizationContext: ['groups' => 'connector:create'],
name: 'create'
),
new Delete(),
new Delete(
security: 'object.user == user'
),
]
)]
#[ORM\Entity(repositoryClass: ConnectorRepository::class)]

View File

@ -74,7 +74,9 @@ use Symfony\Component\Uid\Uuid;
security: 'object.user == user',
name: 'update'
),
new Delete(),
new Delete(
security: 'object.user == user'
),
],
)]
class WatchList