There is user_group which is assigned to one host as owner with id=x. For organization assigned to user with same id=x, on edit page showing a grey color with message "this is used by a host". With this commit, it should not show message to organization assigned to user with same id as of user_groups.
Also, refactored the association code for (User, Usergroup) -> UserRoles.
fixes #17157 - inconsistent mapping of host owner
There is user_group which is assigned to one host as owner
with id=x. For organization assigned to user with same id=x,
on edit page showing a grey color with message
"this is used by a host".
With this commit, it should not show message to organization
assigned to user with same id as of user_groups.
Also, refactored the association code for
(User, Usergroup) -> UserRoles.