Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api): remove ValidateDeleteRequestsListener #5275

Merged
merged 3 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/src/Entity/ActivityProgressLabel.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
validationContext: ['groups' => ['Default', 'update']]
),
new Delete(
validate: true,
validationContext: ['groups' => ['delete']],
security: 'is_granted("CAMP_MANAGER", object)'
),
new GetCollection(
Expand Down
2 changes: 2 additions & 0 deletions api/src/Entity/CampCollaboration.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
validationContext: ['groups' => ['Default', 'update']]
),
new Delete(
validate: true,
validationContext: ['groups' => ['delete']],
security: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)'
),
new Patch(
Expand Down
4 changes: 3 additions & 1 deletion api/src/Entity/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
),
new Delete(
processor: CategoryRemoveProcessor::class,
security: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)'
security: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)',
validate: true,
validationContext: ['groups' => ['delete']],
),
new GetCollection(
security: 'is_authenticated()'
Expand Down
4 changes: 3 additions & 1 deletion api/src/Entity/MaterialList.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
security: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)'
),
new Delete(
security: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)'
security: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)',
validate: true,
validationContext: ['groups' => ['delete']]
manuelmeister marked this conversation as resolved.
Show resolved Hide resolved
),
new GetCollection(
security: 'is_authenticated()'
Expand Down
1 change: 1 addition & 0 deletions api/src/Entity/Period.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
),
new Delete(
security: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)',
validate: true,
validationContext: ['groups' => ['delete', 'Period:delete']]
),
new GetCollection(
Expand Down
1 change: 1 addition & 0 deletions api/src/Entity/ScheduleEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
),
new Delete(
security: 'is_granted("CAMP_MEMBER", object) or is_granted("CAMP_MANAGER", object)',
validate: true,
validationContext: ['groups' => ['delete', 'ScheduleEntry:delete']]
),
new GetCollection(
Expand Down
46 changes: 0 additions & 46 deletions api/src/EventListener/ValidateDeleteRequestsListener.php

This file was deleted.

Loading