aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-03-01 23:36:28 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-03-02 11:03:52 +0100
commit52d9983deaedcb76473e16726b87072a30477db3 (patch)
tree5ddf9b53acd3ec0a52f5b6dd2851cb46208367ac /data
parent4a74e3ef90fd60a4fd57b1fa2a456ea692365059 (diff)
downloadayatana-indicator-keyboard-52d9983deaedcb76473e16726b87072a30477db3.tar.gz
ayatana-indicator-keyboard-52d9983deaedcb76473e16726b87072a30477db3.tar.bz2
ayatana-indicator-keyboard-52d9983deaedcb76473e16726b87072a30477db3.zip
Add AccountsService support
Diffstat (limited to 'data')
-rw-r--r--data/50-org.ayatana.indicator.keyboard.AccountsService.pkla6
-rw-r--r--data/CMakeLists.txt14
-rw-r--r--data/org.ayatana.indicator.keyboard2
-rw-r--r--data/org.ayatana.indicator.keyboard.AccountsService.policy21
-rw-r--r--data/org.ayatana.indicator.keyboard.AccountsService.xml11
5 files changed, 53 insertions, 1 deletions
diff --git a/data/50-org.ayatana.indicator.keyboard.AccountsService.pkla b/data/50-org.ayatana.indicator.keyboard.AccountsService.pkla
new file mode 100644
index 00000000..f562c6fd
--- /dev/null
+++ b/data/50-org.ayatana.indicator.keyboard.AccountsService.pkla
@@ -0,0 +1,6 @@
+[Allow LightDM to set AccountsService fields]
+Identity=unix-user:lightdm
+Action=org.ayatana.indicator.keyboard.AccountsService.ModifyAnyUser
+ResultActive=yes
+ResultInactive=yes
+ResultAny=yes
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 1c9859be..67c531ff 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -38,3 +38,17 @@ install (FILES "${AYATANA_INDICATOR_FILE}" DESTINATION "${AYATANA_INDICATOR_DIR}
set (ICON_DIR "${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor")
message (STATUS "${ICON_DIR} is the Icon install dir")
install (DIRECTORY icons/scalable DESTINATION "${ICON_DIR}" FILES_MATCHING PATTERN "*.svg")
+
+# org.ayatana.indicator.keyboard.AccountsService.xml
+
+install(FILES org.ayatana.indicator.keyboard.AccountsService.xml DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/dbus-1/interfaces")
+install(CODE "message(STATUS \"Symlinking: \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/accountsservice/interfaces/org.ayatana.indicator.keyboard.AccountsService.xml\")")
+install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../../dbus-1/interfaces/org.ayatana.indicator.keyboard.AccountsService.xml \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/accountsservice/interfaces/org.ayatana.indicator.keyboard.AccountsService.xml)")
+
+# org.ayatana.indicator.keyboard.AccountsService.policy
+
+install(FILES org.ayatana.indicator.keyboard.AccountsService.policy DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/polkit-1/actions")
+
+# 50-org.ayatana.indicator.keyboard.AccountsService.pkla
+
+install(FILES 50-org.ayatana.indicator.keyboard.AccountsService.pkla DESTINATION "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/polkit-1/localauthority/10-vendor.d")
diff --git a/data/org.ayatana.indicator.keyboard b/data/org.ayatana.indicator.keyboard
index 30e235d3..70da3a63 100644
--- a/data/org.ayatana.indicator.keyboard
+++ b/data/org.ayatana.indicator.keyboard
@@ -11,4 +11,4 @@ Position=1000
ObjectPath=/org/ayatana/indicator/keyboard/desktop
[desktop_greeter]
-ObjectPath=/org/ayatana/indicator/keyboard/desktop_greeter
+ObjectPath=/org/ayatana/indicator/keyboard/greeter
diff --git a/data/org.ayatana.indicator.keyboard.AccountsService.policy b/data/org.ayatana.indicator.keyboard.AccountsService.policy
new file mode 100644
index 00000000..60bbfd2b
--- /dev/null
+++ b/data/org.ayatana.indicator.keyboard.AccountsService.policy
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<policyconfig>
+ <action id="org.ayatana.indicator.keyboard.AccountsService.ModifyOwnUser">
+ <description>Set properties of own user</description>
+ <message>Authentication is required to set one's own indicator keyboard properties.</message>
+ <defaults>
+ <allow_any>yes</allow_any>
+ <allow_inactive>yes</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+ <action id="org.ayatana.indicator.keyboard.AccountsService.ModifyAnyUser">
+ <description>Set properties of any user</description>
+ <message>Authentication is required to set another user's indicator keyboard properties.</message>
+ <defaults>
+ <allow_any>no</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>no</allow_active>
+ </defaults>
+ </action>
+</policyconfig>
diff --git a/data/org.ayatana.indicator.keyboard.AccountsService.xml b/data/org.ayatana.indicator.keyboard.AccountsService.xml
new file mode 100644
index 00000000..7b7754e2
--- /dev/null
+++ b/data/org.ayatana.indicator.keyboard.AccountsService.xml
@@ -0,0 +1,11 @@
+<node>
+ <interface name="org.ayatana.indicator.keyboard.AccountsService">
+ <annotation name="org.freedesktop.Accounts.VendorExtension" value="true"/>
+ <annotation name="org.freedesktop.Accounts.Authentication.ChangeOwn" value="org.ayatana.indicator.keyboard.AccountsService.ModifyOwnUser"/>
+ <annotation name="org.freedesktop.Accounts.Authentication.ReadAny" value="org.ayatana.indicator.keyboard.AccountsService.ModifyAnyUser"/>
+ <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny" value="org.ayatana.indicator.keyboard.AccountsService.ModifyAnyUser"/>
+ <property name="Layouts" type="as" access="readwrite">
+ <annotation name="org.freedesktop.Accounts.DefaultValue" value="[]"/>
+ </property>
+ </interface>
+</node>