Skip to content

Commit

Permalink
feat: improve security when delete
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed Aug 16, 2024
1 parent 8b47d60 commit 1c18218
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Entity/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
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)]
Expand Down
4 changes: 3 additions & 1 deletion src/Entity/WatchList.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@
security: 'object.user == user',
name: 'update'
),
new Delete(),
new Delete(
security: 'object.user == user'
),
],
)]
class WatchList
Expand Down

0 comments on commit 1c18218

Please sign in to comment.