Skip to content

Commit

Permalink
Session: Fix my sessions access.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Oct 7, 2021
1 parent b5d40eb commit 84bea41
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/CoreBundle/Entity/SessionRelCourse.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,20 @@
#[ApiResource(
collectionOperations: [
'get' => [
'security' => "is_granted('ROLE_ADMIN')",
'security' => "is_granted('ROLE_USER')",
],
'post' => [
'security' => "is_granted('ROLE_ADMIN')",
],
],
itemOperations: [
'get' => [
'security' => "is_granted('ROLE_ADMIN')",
'security' => "is_granted('ROLE_ADMIN') or is_granted('VIEW', object)",
],
'put' => [
'security' => "is_granted('ROLE_ADMIN')",
],
],
attributes: [
'security' => "is_granted('ROLE_ADMIN')",
],
denormalizationContext: [
'groups' => ['session_rel_course:write'],
],
Expand Down

0 comments on commit 84bea41

Please sign in to comment.