def has_perm(user, perm, obj):
    """
    Return true is has_perm on the user would return true for either the
    object or global permission check.
    """
    return user.has_perm(perm) or user.has_perm(perm, obj)