Added some functionality so the permission is automatically created