I believe Role.getRoles functionality isn't working as expected. When issued for a user, it will return the names of dynamically resolved roles such as $authenticated, $everyone, etc.. and then for normal roles, the role id. So you get an array of names and Ids together. I do not see any reason for this and I find it incorrect.
- You can see that for resolved roles it adds the name here
- But for normal roles it adds the id... here
Any opinions???