Permissions refactor

cc @fancyremarker
Nm, seeing it in the underlying library.