I HATE the relationship!!
I don't think its illegal in the entire federation to have a relationship with a supervised person.
I'm not certain that Spock ever directly supervised Uhura, no more than he directly supervised Chapel.
Troi and Riker were in some sort of relationship.
AGAIN, it is about SUPERVISION. The first officer has direct supervision over all the bridge crew.
Troi was NOT a bridge crew member - and was in the Science/Medical section anyhow- and for most of the show was not even an officer AT ALL and was in fact a civilian (hence the non-federation outfits she wore)
I do however, have issues with the fact that she was the ship's councilor and in fact Riker had used her services. There were other councilor's onboard and it was never made clear if Riker (and Worf) stopped using her services "professionally". Perhaps an ethics violation is in order for her? But, it would not be a federation complaint...
Worf and Dax - again they were co-workers - not supervisory. BOTH were Lt. Commanders at the time their relationship started.
Paris and B'Elanna again, Tom bridge officer - B'Elanna ENGINEERING. And, AGAIN Tom did not supervise B'Elanna or visa versa as Tom's supervisor was Chakotay and B'Elanna was chief engineer - maybe reporting to Chakotay but probably directly to the captain as she was her department head.