vitalik / django-ninja

💨 Fast, Async-ready, Openapi, type hints based framework for building APIs
https://django-ninja.dev
MIT License
7.03k stars 421 forks source link

Could you tell me how to achieve add_router, the management of permissions, such as the request, the user. The groups. The filter (name = 'admin'). The exists () to True to this route #1301

Closed 2622594863 closed 6 days ago

2622594863 commented 1 week ago

Please describe what you are trying to achieve Could you tell me how to achieve add_router, the management of permissions, such as the request, the user. The groups. The filter (name = 'admin'). The exists () to True to this route Please include code examples (like models code, schemes code, view function) to help understand the issue

api = NinjaExtraAPI() api.register_controllers(NinjaJWTDefaultController)

api.add_router("data", data.router, tags=['test'],auth=JWTAuth())