Fixes #17571 - Refactor tfm.tools to use ES6 syntax
This also extracts the inherited user roles function to a sepereate module, adds tests and refactors it. These changes also fix two other issues: 1. a possible stored XSS in usergroup names, 2. tooltips on tables were broken (due to => syntax not changing `this`) (cherry picked from commit 9a082a8bfe273e4659403d2886d934075ba72fa9)
Related issues
Refactor #17571: The foreman tools js module could be refactored to take advantage of some ES6 features
Fixes #17571 - Refactor tfm.tools to use ES6 syntax
This also extracts the inherited user roles function to a sepereate
module, adds tests and refactors it. These changes also fix two other
issues:
1. a possible stored XSS in usergroup names,
2. tooltips on tables were broken (due to => syntax not changing `this`)
(cherry picked from commit 9a082a8bfe273e4659403d2886d934075ba72fa9)