it depends.
Can you test continuity between B- and the case? B+ and the case?
If you do, putting the controller direct to the metal frame essentially makes the whole frame ground, and if you work on the bike, do not touch any high voltage connections while leaning against the frame.
It's the same reason we keep our 12V isolated, so we don't get shocked.
It boils down to "are you ok with that risk?"