Alexey,
This is a little bit of a "then don't do that" situation. Why are you passing a DetailedUser? While DetailedUser might extend ApplicationUser, it's not intended to be used as an input to anything. It's an output that adds some additional details for use on certain UI screens.
There's a pretty low likelihood we'll do anything to change this. Why are you hitting it?
Best regards,
Bryan Turner
Atlassian Bitbucket
Thanks a lot, Bryan!