Permissions refactor

cc @fancyremarker
Does `account_permissions` need to be defined here as well?