Code review before possible merge

Can you please review this code?
In this version, there is absolutely no dependence on the redmine_organizations plugin.
Thanks!