(user, podcast)
return PublishedPodcast.objects.filter(publisher=user, podcast=podcast).exists()
Checks if the user has publisher permissions for the given podcast
Checks if the user has publisher permissions for the given podcast
Checks if the user has publisher permissions for the given podcast
def check_publisher_permission(user, podcast):
    """Checks if the user has publisher permissions for the given podcast"""

    if not user.is_authenticated:
        return False

    if user.is_staff:
        return True

    return PublishedPodcast.objects.filter(publisher=user, podcast=podcast).exists()
def check_publisher_permission ( user , podcast ) : if not user . is_authenticated : return False if user . is_staff : return True return PublishedPodcast . objects . filter ( publisher = user , podcast = podcast ) . exists ( )