-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Labels
Description
API Platform version(s) affected: 3.0.0
Description
When using the security property on the ApiProperty attribute on an entity property, the object object received, is null
How to reproduce
// src/Entity/Dummy.php
#[ApiProperty(
security: "is_granted('VIEW',object)",
securityPostDenormalize: "is_granted('MODERATE',object)",
schema: [
'type' => 'boolean',
])]
public bool $isModerated = false;
In my scenario, VIEW should returns true and MODERATE should returns false
Possible Solution
The security attribute should get an access to the object that is created
Additional Context