Add support for public permissions.
Add tests for the public permissions support. Closes #1.