Add filtering to get_groups and filter if we want shell groups