We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#[Put(security: "is_granted('ROLE_ADMIN') or object.owner == user")]
How to disable the PUT operation if not is_granted('ROLE_ADMIN') on the OpenAPI specification ?
is_granted('ROLE_ADMIN')
Ideas:
object
object.owner
Implementation:
Create a new Normalizer that removes stuff from the open api doc (like https://github.com/api-platform/core/blob/main/src/OpenApi/Serializer/OpenApiNormalizer.php) or decorate the OpenApiFactory in a new factory. Do not add this to the current OpenApiFactory.
The text was updated successfully, but these errors were encountered:
also #2719
Sorry, something went wrong.
No branches or pull requests
#[Put(security: "is_granted('ROLE_ADMIN') or object.owner == user")]
How to disable the PUT operation if not
is_granted('ROLE_ADMIN')
on the OpenAPI specification ?Ideas:
object
is not available)object.owner
with a proxy ?Implementation:
Create a new Normalizer that removes stuff from the open api doc (like https://github.com/api-platform/core/blob/main/src/OpenApi/Serializer/OpenApiNormalizer.php) or decorate the OpenApiFactory in a new factory. Do not add this to the current OpenApiFactory.
The text was updated successfully, but these errors were encountered: