5. Notwithstanding any provisions to the contrary contained in this chapter, or any general, special or local law, the New York city housing authority shall have the power in its discretion to provide and maintain a housing police department and a uniformed housing police force. Such department and force shall have the power and it shall be their duty, in and about housing facilities, to preserve the public peace, prevent crime, detect and arrest offenders, suppress riots, mobs and insurrections, disperse unlawful or dangerous assemblages and assemblages which obstruct free passage; protect the rights of persons and property; guard the public health; remove all nuisances; enforce and prevent violation of all laws and ordinances; and for these purposes to arrest all persons guilty of violating any law or ordinance and shall provide for the performance, without unnecessary delay, of all recording, fingerprinting, photographing and other preliminary police duties. Appointments to such housing police force shall be made in accordance with applicable provisions of the civil service law and only persons who have never been convicted of a felony, and who are citizens of the United States shall be appointed housing patrol officers on the housing police force. Each member of such force shall be a police officer as defined by paragraph (e) of subdivision thirty-four of section 1.20 of the criminal procedure law and, while on duty, shall possess all the powers of a police officer of a city in the execution of criminal process; and criminal process issued by any court or magistrate of a city may be directed to and executed by a member of such force. The authority may appoint a chief and a deputy chief of the housing police department who, in the discretion of the authority, may be selected from the ranks of the housing police force, and assign powers and duties to them and fix their compensation. The chief shall be the head of such department. During the absence or disability of the chief, the deputy chief shall possess all the powers and perform all the duties of the chief. The housing police force shall consist of captains, lieutenants, sergeants and patrolmen. The authority shall maintain a division for detective purposes to be known as the detective division and may, from time to time, detail to service in said division as many members of the force as it may deem necessary, and may at any time within three years of appointment revoke any such detail or a part thereof. If the authority, in its discretion, dissolves the housing authority police department and the housing authority police force, the division for detective purposes shall also be dissolved. Any member of the force while so detailed may be granted an increase in salary above the grade established for his rank in the uniformed force, but shall retain his rank in the force and shall be eligible for promotion the same as if serving in the uniformed force, and the time during which he serves in such division shall count for all purposes as if served in his rank or grade in the uniformed force.