Support the new v2 API permissions format.
Merge pull request #359 from recurser/v2-permissions

Support the new v2 API permissions format.