Add check_primary_group method on command