Update codebase to use new permissions setup

And fix broken specs.