Moving permissions tests to their own class and refactoring page