def fw_app_list(data):
    """
    Used in generating macOS configuration profiles. Generates a dictionary used in configuring Firewall settings.

    :param data: Form data (Dictionary)
    :returns: Dictionary - {'bundle_id': <string>, 'allowed': <boolean>}
    """
    apps = []
    count = data['extra_firewall']
    for i in range(count):
        bundle = data['id_%s' % str(i + 1)]
        allowed = data['permit_%s' % str(i + 1)]
        if bundle not in [None, '']:
            apps.append({'bundle_id': bundle, 'allowed': allowed})
    return apps