Skip to content

DjangoObjectPermissionsFilter broken by guardian 1.3 (devel) #3163

Closed
@gabn88

Description

@gabn88

The guardian shortcut "get_objects_for_user" uses accept_global_perms=True as default, which means that if you have a group that has view permission for ModelClass, and then filter on the objects, you will get ALL objects.

Easy way to fix this is to return guardian.shortcuts.get_objects_for_user(user, permission, queryset, accept_global_perms=False) instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions