Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ModelServiceBase should allow default filtering base on the Request #179

Open
tareksanger opened this issue Aug 27, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@tareksanger
Copy link

Description:

Currently, the ModelServiceBase class in Django Ninja Extra does not provide a built-in mechanism for applying default filters to querysets based on the incoming Request. This feature is essential for scenarios where data needs to be scoped to the requesting user, such as in multi-tenant applications where each user should only access data associated with their account

Proposed Enhancement:

I propose adding a method or a mechanism within ModelServiceBase that allows developers to define default filters that will be applied to the queryset based on the Request object. This would simplify the process of ensuring data separation and make it easier to implement consistent filtering logic across different services.

@eadwinCode eadwinCode added the enhancement New feature or request label Aug 28, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@eadwinCode @tareksanger and others