Skip to content

Some Filters Bypass Default Admin Queryset #75

@ErikUmble

Description

@ErikUmble

Normally, the rows that show up in DataBrowser are limited to those returned in the queryset from get_queryset defined in the ModelAdmin for a model. But when filtering on a column in DataBrowser, certain filters seem to enable bypassing that get_queryset method.

Specifically, I find that regex, ends with, starts with, contains, and equals each enable this bypass, whereas the other filters do not.

In my situation, we use the get_queryset to perform an initial filter to only show objects that the user has permission to view. By using the column filter, however, users are able to bypass that filter and access data that should not be accessible to them.

For reference, we are using version 4.2.5. It did not seem like this was fixed in a more recent version, but if it has, my apologies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions