aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-10-12 21:03:40 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-10-12 21:03:40 +0200
commit933deec83fe4dbd41652966a2380dfab44add7b7 (patch)
tree286d813e986546d53cac8527d18f4e1d4ffb69ce
parenta6e1383438befc0a3389e44aef8a1fe0951c10a5 (diff)
parentffd995cd13bb4e9a2319b0b41b2ab919b985cb6b (diff)
downloadayatana-indicator-keyboard-933deec83fe4dbd41652966a2380dfab44add7b7.tar.gz
ayatana-indicator-keyboard-933deec83fe4dbd41652966a2380dfab44add7b7.tar.bz2
ayatana-indicator-keyboard-933deec83fe4dbd41652966a2380dfab44add7b7.zip
Merge branch 'tari01-pr/polkit-rules'
Attributes GH PR #58: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/pull/58
-rw-r--r--data/50-org.ayatana.indicator.keyboard.AccountsService.rules7
-rw-r--r--data/CMakeLists.txt4
2 files changed, 11 insertions, 0 deletions
diff --git a/data/50-org.ayatana.indicator.keyboard.AccountsService.rules b/data/50-org.ayatana.indicator.keyboard.AccountsService.rules
new file mode 100644
index 00000000..80c850e7
--- /dev/null
+++ b/data/50-org.ayatana.indicator.keyboard.AccountsService.rules
@@ -0,0 +1,7 @@
+// Allow LightDM to set AccountsService fields
+polkit.addRule (function (action, subject) {
+ if (action.id == "org.ayatana.indicator.keyboard.AccountsService.ModifyAnyUser" && subject.user == "lightdm")
+ {
+ return polkit.Result.YES;
+ }
+});
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index bc395754..a3efca54 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -52,6 +52,10 @@ install(FILES org.ayatana.indicator.keyboard.AccountsService.policy DESTINATION
install(FILES 50-org.ayatana.indicator.keyboard.AccountsService.pkla DESTINATION "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/polkit-1/localauthority/10-vendor.d")
+# 50-org.ayatana.indicator.keyboard.AccountsService.rules
+
+install (FILES 50-org.ayatana.indicator.keyboard.AccountsService.rules DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/polkit-1/rules.d")
+
# org.ayatana.indicator.keyboard.gschema.xml
find_package (GSettings REQUIRED)