(user)
return False
checks if the given user has publisher rights,
    ie he is either set as the publisher of at least one podcast,
    or he has the staff flag set
checks if the given user has publisher rights,
    ie he is either set as the publisher of at least one podcast,
    or he has the staff flag set
checks if the given user has publisher rights ie he is either set as the publisher of at least one podcast or he has the staff flag set
def is_publisher(user):
    """
    checks if the given user has publisher rights,
    ie he is either set as the publisher of at least one podcast,
    or he has the staff flag set
    """

    if not user.is_authenticated:
        return False

    if user.is_staff:
        return True

    if PublishedPodcast.objects.filter(publisher=user).exists():
        return True

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