implemented flexible user group resolution