Question from the API Platform test

How to customize a serialization group according to the logged in user in API Platform?