Other statutory restrictions
There are additional statutory restrictions that apply to local authorities and registered social landlords when they are allocating accommodation.
Under the Equality Act 2010 it's unlawful for local authorities and registered social landlords to discriminate against someone on the grounds of race, sex, disability, sexual orientation or religion or belief when they are letting, sub-letting or selling properties.  For example, it's unlawful for a local authority or registered social landlord to not allocate a property to someone because of their race.
In English case law, the Court of Appeal confirmed that a housing association’s policy of prioritising members of the Orthodox Jewish community when allocating its social housing stock was lawful. The preferential treatment pursued the legitimate aim of overcoming the disadvantages faced by them because of their religion and beliefs. Section 193(2)(b) of the Equality Act 2010 did not require a proportionality assessment in cases of positive action by charitable institutions aimed at compensating for disadvantages linked to protected characteristics. 
The duty to encourage equal opportunities
Local authorities and registered social landlords have a duty to encourage equal opportunities and to comply with existing legal requirements in relation to equal opportunities. 
These terms are defined in the Scotland Act 1998:
'Equal opportunities' means the prevention, elimination or regulation of discrimination between persons on grounds of sex or marital status, on racial grounds, or on grounds of disability, age, sexual orientation, language or social origin, or of other personal attributes, including beliefs or opinions, such as religious beliefs or political opinions.
'Equal opportunity requirements' means the requirements of the law for the time being relating to equal opportunities.  The law currently is restricted to race, sex, sexual orientation, disability and religion or belief.
The law currently is restricted to race, sex, sexual orientation, disability and religion or belief.