〜のをいいことに
taking (unfair) advantage of
Plain form (な-adj な, Noun な) + のをいいことに
Sign up free to review this point on a spaced schedule.
のをいいことに means someone uses a situation as a chance to do something they shouldn't: 先生がいないのをいいことに、生徒たちは騒いでいた, "taking advantage of the teacher's absence, the students were making a racket".
The first half is a circumstance that removes a check: nobody's watching, parents are out, someone is too kind, no one complains. The second half is bad or selfish behaviour, and the speaker disapproves.
It's literally "treating it as a good thing that…". Compare おかげで, "thanks to", which is grateful, and をきっかけに (N2), "triggered by", which is neutral.
After な-adjectives and nouns, use な: 留守なのをいいことに.
Examples
先生がいないのをいいことに、生徒たちは騒いでいた。
Taking advantage of the teacher's absence, the students were making a racket.
親が留守なのをいいことに、夜遅くまで遊んだ。
With my parents away, I took the chance to stay out late.
誰も見ていないのをいいことに、ごみを捨てた。
Since no one was looking, he dumped his rubbish.
彼女が優しいのをいいことに、彼は甘えてばかりいる。
He takes advantage of her kindness and relies on her for everything.
注意されないのをいいことに、彼は遅刻を繰り返している。
Since nobody tells him off, he keeps turning up late.