Skip to content

Commit

Permalink
fix: fold character that is not special for Jinja
Browse files Browse the repository at this point in the history
Fixes: #82
  • Loading branch information
ben-grande committed Jun 30, 2024
1 parent f903c0e commit 09bd216
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions salt/sys-usb/files/admin/policy/default.policy
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# vim:ft=qrexecpolicy foldmethod=expr foldexpr=getline(v\:lnum)=~'^##!'?'>1'\:'=':

## Do not modify this file, create a new policy with with a lower number in the
## file name instead. For example `30-user.policy`.

# Input {{{
##! Section: Input
{% if salt['pillar.get']('qvm:sys-usb:mouse-action', 'ask') == 'ask' -%}
{% set mouse_action = 'ask default_target=dom0' -%}
{%- set mouse_action = 'ask default_target=dom0' -%}
{% elif salt['pillar.get']('qvm:sys-usb:mouse-action', 'ask') == 'allow' -%}
{%- set mouse_action = 'allow' -%}
{% else -%}
Expand Down Expand Up @@ -38,9 +39,8 @@ qubes.InputKeyboard * @tag:usbvm @adminvm deny

qubes.InputTablet * @tag:usbvm @adminvm {{ tablet_action }}
qubes.InputTablet * @tag:usbvm @adminvm deny
# }}}

# CTAP {{{
##! CTAP
ctap.ClientPin * @anyvm @tag:usbvm ask user=root default_target=disp-{{ sls_path }}
ctap.ClientPin * @anyvm @default ask user=root default_target=disp-{{ sls_path }}
ctap.ClientPin * @anyvm @anyvm deny
Expand All @@ -59,9 +59,8 @@ u2f.Register * @anyvm @anyvm deny

policy.RegisterArgument +u2f.Authenticate @tag:usbvm @anyvm allow target=dom0
policy.RegisterArgument +u2f.Authenticate @anyvm @anyvm deny
# }}}

# Audio {{{
##! Audio
{# Keep in sync with sys-audio policy #}
{% set audiovm = 'disp-' ~ sls_path %}
admin.vm.device.usb.Available * @tag:audiovm @tag:usbvm allow target=dom0
Expand Down Expand Up @@ -105,6 +104,3 @@ admin.vm.feature.CheckWithTemplate +supported-service.pipewire @anyvm @tag:audio

admin.vm.property.GetAll * {{ audiovm }} @tag:audiovm-{{ audiovm }} allow target=dom0
admin.vm.property.GetAll * @anyvm @tag:audiovm-{{ audiovm }} deny
# }}}

# vim:ft=qrexecpolicy

0 comments on commit 09bd216

Please sign in to comment.