Finished the permissions API implementation