It would also be legal if it falls under one of the FHA exceptions, such as
a building with 4 or fewer units that the landlord also lives in (i.e. basement apartment) or a house whose owner owns 3 or fewer houses. If the property doesn't fall under FHA the owner could be as discriminatory as they want.