Introduce the permission matrix and write tests for the user group resources and its operations.