Nostro/packaging/system/net.catcrafts.Nostro1.policy

99 lines
4.6 KiB
Text
Raw Normal View History

2026-11-01 18:35:23 +01:00
<?xml version="1.0" encoding="UTF-8"?> <!--*-nxml-*-->
<!-- SPDX-License-Identifier: LGPL-3.0-only -->
<!-- SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® -->
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<!-- What nostrod (net.catcrafts.Nostro1) asks polkit before it does anything for a caller.
Every action is owned by unix-user:nostro, the user nostrod runs as: polkit lets only root or an action's owner
check a call made by another user, or pass the details the dialog shows. $(summary) is what nostrod read for the
call itself, such as the amount, the payee and the account of a payment; the details amount_minor, currency,
counterparty, account_iban, environment and, at checkout, reference are there for rules (an amount above which an
administrator must approve, say).
No action keeps an authorization: polkit ties a kept one to the calling process, so the CLI would ask every time
anyway. Viewing and the changes that move no money are free in an active session; whatever moves money (an app's
checkout included), unfreezes or blocks a card, or changes the bank connections or the account checkouts pay from
asks for the user's password every time.
Install: /usr/share/polkit-1/actions/net.catcrafts.Nostro1.policy. Tune with rules in /etc/polkit-1/rules.d/. -->
<policyconfig>
<vendor>Catcrafts</vendor>
<action id="net.catcrafts.Nostro1.View">
<description>See your bank accounts, transactions, requests and cards</description>
<message>Authentication is required to $(summary)</message>
<defaults>
<allow_any>auth_self</allow_any>
<allow_inactive>auth_self</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
</action>
<action id="net.catcrafts.Nostro1.Change">
<description>Ask for money, make draft payments, cancel what is pending, or freeze a card</description>
<message>Authentication is required to $(summary)</message>
<defaults>
<allow_any>auth_self</allow_any>
<allow_inactive>auth_self</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
</action>
<action id="net.catcrafts.Nostro1.Pay">
<description>Make a payment, schedule one, or accept a request or a draft payment</description>
<message>Authentication is required to $(summary)</message>
<defaults>
<allow_any>auth_self</allow_any>
<allow_inactive>auth_self</allow_inactive>
<allow_active>auth_self</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
</action>
<action id="net.catcrafts.Nostro1.UnfreezeCard">
<description>Let a frozen card pay again</description>
<message>Authentication is required to $(summary)</message>
<defaults>
<allow_any>auth_self</allow_any>
<allow_inactive>auth_self</allow_inactive>
<allow_active>auth_self</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
</action>
<action id="net.catcrafts.Nostro1.BlockCard">
<description>Report a card lost or stolen, which blocks it for good</description>
<message>Authentication is required to $(summary)</message>
<defaults>
<allow_any>auth_self</allow_any>
<allow_inactive>auth_self</allow_inactive>
<allow_active>auth_self</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
</action>
<action id="net.catcrafts.Nostro1.Connectors">
<description>Add or remove a bank connection, or choose the account apps may ask you to pay from</description>
<message>Authentication is required to $(summary)</message>
<defaults>
<allow_any>auth_self</allow_any>
<allow_inactive>auth_self</allow_inactive>
<allow_active>auth_self</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
</action>
<action id="net.catcrafts.Nostro1.Checkout">
<description>Pay an order an app asks you to pay</description>
<message>Authentication is required to $(summary)</message>
<defaults>
<allow_any>auth_self</allow_any>
<allow_inactive>auth_self</allow_inactive>
<allow_active>auth_self</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
</action>
</policyconfig>