How to make only a group of users can send messages to staff

I have a plugin that allows everyone to send to staff. It should be possible to make it so that only a group can.

It’s currently failing tests on Travis. I don’t know why.

https://github.com/pfaffman/discourse-allow-pm-to-staff