{% extends 'base.html' %} {% load base_extras inventory_extras ui_extras %} {% block content %}

Rule{{ page_obj.paginator.count|pluralize }} ({{ page_obj.paginator.count }})

{% if perms.santa.add_rule %} {% endif %}
{{ form }}
{% if page_obj %} {% pagination next_url previous_url %} {% for rule in page_obj %} {% with rule.target as target %}
{% if rule.custom_msg %} {% endif %} {% if rule.description %} {% endif %} {% if rule.serial_numbers %} {% endif %} {% if rule.excluded_serial_numbers %} {% endif %} {% if rule.primary_users %} {% endif %} {% if rule.excluded_primary_users %} {% endif %} {% with rule.tags.count as tag_count %} {% if tag_count %} {% endif %} {% endwith %} {% with rule.excluded_tags.count as excluded_tag_count %} {% if excluded_tag_count %} {% endif %} {% endwith %} {% if perms.santa.view_ruleset and rule.ruleset %} {% endif %}
Policy
{{ rule.get_policy_display }}
{% if not rule.ruleset and not rule.is_voting_rule %} {% if perms.santa.change_rule or perms.santa.delete_rule %}
{% if perms.santa.change_rule %} {% url 'santa:update_configuration_rule' configuration.pk rule.pk as url %} {% button 'UPDATE' url "Edit rule" %} {% endif %} {% if perms.santa.delete_rule %} {% url 'santa:delete_configuration_rule' configuration.pk rule.pk as url %} {% button 'DELETE' url "Delete rule" %} {% endif %}
{% endif %} {% endif %}
Voting rule? {{ rule.is_voting_rule|yesno }}
{{ target.get_type_display }} {% if perms.santa.view_target %} {{ target.identifier }} {% else %} {{ target.identifier }} {% endif %} {% for file in target.files %}
name
{{ file.name }}
path
{{ file.path }}
{% if file.bundle %}
bundle id
{{ file.bundle.bundle_id }}
bundle name
{{ file.bundle.bundle_name }}
bundle version
{{ file.bundle.bundle_version_str }}
{% if file.bundle_path %}
bundle path
{{ file.bundle_path }}
{% endif %} {% endif %} {% endfor %} {% if target.type == "BUNDLE" %} {% with target.bundle as bundle %}
id
{{ bundle.bundle_id }}
name
{{ bundle.name }}
version
{{ bundle.version_str }}
binaries
{{ bundle.binary_targets.count }}
{% endwith %} {% endif %} {% if target.type == "CERTIFICATE" %} {% for cert in target.certificates %}
common name
{{ cert.common_name|default:"-" }}
organization
{{ cert.organization|default:"-" }}
organizational_unit
{{ cert.organizational_unit|default:"-" }}
validity
{{ cert.valid_from }} - {{ cert.valid_until }}
{% endfor %} {% endif %} {% if target.type == "TEAMID" or target.type == "SIGNINGID" %} {% for team_id in target.team_ids %}
organization
{{ team_id.organization|default:"-" }}
{% endfor %} {% endif %}
Custom message {{ rule.custom_msg }}
Description {{ rule.description|linebreaks }}
Serial number{{ rule.serial_numbers|length|pluralize }}
    {% for serial_number in rule.serial_numbers %}
  • {{ serial_number|privacywrapper }}
  • {% endfor %}
Excluded serial number{{ rule.excluded_serial_numbers|length|pluralize }}
    {% for serial_number in rule.excluded_serial_numbers %}
  • {{ serial_number|privacywrapper }}
  • {% endfor %}
Primary user{{ rule.primary_users|length|pluralize }}
    {% for primary_user in rule.primary_users %}
  • {{ primary_user }}
  • {% endfor %}
Excluded primary user{{ rule.excluded_primary_users|length|pluralize }}
    {% for primary_user in rule.excluded_primary_users %}
  • {{ primary_user }}
  • {% endfor %}
Tag{{ tag_count|pluralize }} {% for tag in rule.tags.all %} {% inventory_tag tag %} {% endfor %}
Excluded tag{{ excluded_tag_count|pluralize }} {% for tag in rule.excluded_tags.all %} {% inventory_tag tag %} {% endfor %}
Ruleset {{ rule.ruleset }}
{% endwith %} {% endfor %} {% pagination next_url previous_url %} {% elif form.has_changed %} {% url 'santa:configuration_rules' configuration.id as empty_results_url %} {% empty_results empty_results_url %} {% endif %} {% endblock %}