XWIKI-8931: Support global user in local group in the new security authorization module

 - Fix a stupid algo