mirror of
https://github.com/boltgolt/howdy.git
synced 2024-09-12 09:41:18 +02:00
Fix polkit policy
- Remove unused actions - Add howdy-gtk action
This commit is contained in:
parent
344eb342f7
commit
d1385da503
4 changed files with 36 additions and 30 deletions
|
@ -79,3 +79,17 @@ install_data(
|
|||
install_dir: get_option('prefix') / get_option('bindir'),
|
||||
install_tag: 'bin',
|
||||
)
|
||||
|
||||
if get_option('with_polkit')
|
||||
polkit_config = configure_file(
|
||||
input: 'src/polkit/com.github.boltgolt.howdy-gtk.policy.in',
|
||||
output: 'com.github.boltgolt.howdy-gtk.policy',
|
||||
configuration: {'script_path': cli_path, 'python_path': py.full_path()}
|
||||
)
|
||||
install_data(
|
||||
polkit_config,
|
||||
install_dir: get_option('prefix') / get_option('datadir') / 'polkit-1' / 'actions',
|
||||
install_mode: 'rw-r--r--',
|
||||
install_tag: 'polkit',
|
||||
)
|
||||
endif
|
||||
|
|
20
howdy-gtk/src/polkit/com.github.boltgolt.howdy-gtk.policy.in
Normal file
20
howdy-gtk/src/polkit/com.github.boltgolt.howdy-gtk.policy.in
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD polkit Policy Configuration 1.0//EN"
|
||||
"https://specifications.freedesktop.org/PolicyKit/1.0/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<vendor>boltgolt</vendor>
|
||||
<vendor_url>https://github.com/boltgolt/howdy</vendor_url>
|
||||
<icon_name>howdy-gtk</icon_name>
|
||||
<action id="com.github.boltgolt.howdy-gtk">
|
||||
<description>Howdy interface</description>
|
||||
<message>Authentication is required to run howdy-gtk</message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>auth_admin</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">@python_path@</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.argv1">@script_path@</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
|
||||
<vendor>boltgolt</vendor>
|
||||
<vendor_url>https://github.com/boltgolt/</vendor_url>
|
||||
<action id="com.github.boltgolt.howdy.add">
|
||||
<_description>Add user profile</_description>
|
||||
<_message>Privileges are required to verify facial recognition.</_message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
<action id="com.github.boltgolt.howdy.remove">
|
||||
<_description>Remove user profile</_description>
|
||||
<_message>Privileges are required to verify facial recognition.</_message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
|
@ -6,4 +6,5 @@ option('user_models_dir', type: 'string', value: '', description: 'Set the user
|
|||
option('log_path', type: 'string', value: '/var/log/howdy', description: 'Set the log file path')
|
||||
option('install_in_site_packages', type: 'boolean', value: false, description: 'Install howdy python files in site packages')
|
||||
option('py_sources_dir', type: 'string', value: '', description: 'Set the python sources directory')
|
||||
option('install_pam_config', type: 'boolean', value: false, description: 'Install pam config file (for Debian/Ubuntu)')
|
||||
option('install_pam_config', type: 'boolean', value: false, description: 'Install pam config file (for Debian/Ubuntu)')
|
||||
option('with_polkit', type: 'boolean', value: false, description: 'Install polkit policy config file')
|
Loading…
Reference in a new issue