Skip to content

ModelServiceBase should allow default filtering base on the Request #179

@tareksanger

Description

@tareksanger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions