Check the role when the user call some method of the API.