aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-10-11 01:04:08 +0200
committerRobert Tari <robert@tari.in>2023-10-11 01:04:08 +0200
commit76e513e4aa606d0afcdc3769a99339315487558a (patch)
treecc6fb5269eb907dd93b578dada6c647d5c465deb
parent23e51ae2a8a12a50d6cb245e2039ea205aafb45b (diff)
downloadayatana-indicator-sound-76e513e4aa606d0afcdc3769a99339315487558a.tar.gz
ayatana-indicator-sound-76e513e4aa606d0afcdc3769a99339315487558a.tar.bz2
ayatana-indicator-sound-76e513e4aa606d0afcdc3769a99339315487558a.zip
Add PolicyKit .rules file
fixes https://github.com/AyatanaIndicators/ayatana-indicator-sound/issues/87
-rw-r--r--data/50-org.ayatana.indicator.sound.AccountsService.rules7
-rw-r--r--data/CMakeLists.txt4
2 files changed, 11 insertions, 0 deletions
diff --git a/data/50-org.ayatana.indicator.sound.AccountsService.rules b/data/50-org.ayatana.indicator.sound.AccountsService.rules
new file mode 100644
index 0000000..426326b
--- /dev/null
+++ b/data/50-org.ayatana.indicator.sound.AccountsService.rules
@@ -0,0 +1,7 @@
+// Allow LightDM to set AccountsService fields
+polkit.addRule (function (action, subject) {
+ if (action.id == "org.ayatana.indicator.sound.AccountsService.ModifyAnyUser" && subject.user == "lightdm")
+ {
+ return polkit.Result.YES;
+ }
+});
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index c988aa4..4052e19 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -92,3 +92,7 @@ DESTINATION "${POLKIT_DATA_DIR}/actions"
install(FILES 50-org.ayatana.indicator.sound.AccountsService.pkla
DESTINATION "${POLKIT_LIB_DIR}/localauthority/10-vendor.d"
)
+
+# 50-org.ayatana.indicator.sound.AccountsService.rules
+
+install (FILES 50-org.ayatana.indicator.sound.AccountsService.rules DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/polkit-1/rules.d")