Get user permissions

This functions was missing. It was present in the documentation but not implemented.