def has_all_permissions(user, permissions):
    """ Return `True` only if the user has all the permissions """

    for perm in permissions:
        if not user.has_perm(perm):
            return False
    return True