Refactor function to check if user belongs to group[s]

Related PROD: https://mirantis.jira.com/browse/PROD-24801

Change-Id: Ifc0e742d8440cc383338cca0f9e4807408dc4a4c
1 file changed