Skip to content

JwtRedirectToLoginIfUnauthenticatedMiddleware does not support "composed" DRF permissions #533

@pwnage101

Description

@pwnage101

JwtRedirectToLoginIfUnauthenticatedMiddleware crashes when attempting to introspect a VIewSet to determine if it contains a specific permission class. This middleware was authored before DRF permission composition existed, so it assumes the permission_classes property always points to an iterable of classes. That is no longer a safe assumption.

Here's a proposed fix that has been tested locally, but it still needs unit tests written: #528

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueA good task for a newcomer to start with

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions