Roles in cotroller

Hello. I would like to add something in the code to be able to consult the roles in the methods in the ODA controller classes? Is there a right way to get Roles by user because if i check the method User.IsInRole always return false.

Thank you in advance