Completely revert the PermissionResource file since the last changes
were a disaster and apparently broke everything in a very sneaky way.
TODO: Add more tests around permission functionality.