Skip to content

Instantly share code, notes, and snippets.

@Airone2000
Last active April 25, 2018 21:10
Show Gist options
  • Save Airone2000/43c7e13b1a83f17f28296ac3c716b487 to your computer and use it in GitHub Desktop.
Save Airone2000/43c7e13b1a83f17f28296ac3c716b487 to your computer and use it in GitHub Desktop.
Using voter with API Platform
https://stackoverflow.com/questions/47713642/api-platform-how-secure-custom-operation
https://symfony.com/doc/current/security/voters.html
Extending request to fit our needs :
https://api-platform.com/docs/core/data-providers/#data-providers
https://api-platform.com/docs/core/extensions
A priori, I only must write the extension and register it so that APIPlatform internal machanism can automatically extend the request for a route.
Let's test it!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment