Permissions UI

Among other things, fixes #482 and #450.
No idea where that creeped in from. Copy/paste? Not sure. I've removed it and it seems everything works fine.