avkluchko/api-platform-extensions
API Security & Role-Based Access Control (RBAC):
admin:read, admin:write) via AdminGroupsContextBuilder to restrict API responses dynamically. Aligns with roadmaps for internal admin dashboards or B2B portals requiring role-specific data exposure.API Performance Optimization:
Symfony/Ecosystem Integration:
Compliance & Auditability:
Avoid if:
api-platform/attribute or custom solutions.Look elsewhere if:
For Executives: "This lightweight, MIT-licensed package adds admin-level security controls to our API Platform stack with minimal dev effort. By enabling role-based data filtering (e.g., hiding sensitive fields from non-admin users), we can secure internal tools like the [Admin Dashboard] without custom builds. Low risk—integrates seamlessly with our existing Symfony/API Platform setup, and the MIT license aligns with our open-source policy. Estimated time savings: [X] dev-weeks vs. building from scratch."
For Engineering:
*"The AdminGroupsContextBuilder decorator lets us dynamically attach admin:read/admin:write groups to API responses, reducing boilerplate for serialization contexts. Key benefits:
For Developers: *"This gives us a drop-in way to hide admin-only fields from non-privileged users. Example:
# config/services.yaml
AVKluchko\ApiPlatformExtensions\Serializer\AdminGroupsContextBuilder:
decorates: 'api_platform.serializer.context_builder'
Now, entities with @Groups({"admin:read"}) will only serialize for admin roles. Perfect for:
How can I help you explore Laravel packages today?