Added logic for getting the list of permission groups.