<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: © 2016 Germar Reitze

SPDX-License-Identifier: GPL-2.0-or-later

This file is part of the program "Back In Time" which is released under GNU
General Public License v2 (GPLv2). See LICENSES directory or go to
<https://spdx.org/licenses/GPL-2.0-or-later.html>
-->
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>

  <vendor>BackInTime</vendor>
  <vendor_url>https://github.com/bit-team/backintime</vendor_url>
  <icon_name>document-save</icon_name>

  <action id="net.launchpad.backintime.qtgui">
    <message gettext-domain="backintime">Authentication is required to run Back In Time as root.</message>
    <description>Start Back In Time GUI as root.</description>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/backintime-qt</annotate>
    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
  </action>

  <action id="net.launchpad.backintime.UdevRuleSave">
    <message gettext-domain="backintime">Authentication is required to change backup schedules triggered by external storage device connections.</message>
    <description>This will install Udev rules which will start Back In Time if a drive get connected.</description>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin_keep</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="net.launchpad.backintime.UdevRuleDelete">
    <message gettext-domain="backintime">Authentication is required to change backup schedules triggered by external storage device connections.</message>
    <description>This will delete Udev rules related to a specific Back In Time backup profile.</description>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin_keep</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

</policyconfig>
