diff options
| author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-12-05 10:15:14 +0100 |
|---|---|---|
| committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-12-05 10:15:14 +0100 |
| commit | 3c0c8488f05430c7d2fc54009d928ffef36d1c61 (patch) | |
| tree | 2b5bac66147fc329e3eaf990f0b1f40681b77b9d /data | |
| parent | 72490e5c84136662476e1792089b23613c09b7b6 (diff) | |
| parent | 8fec9b6fafe17c0182d3dda6157acf772898d518 (diff) | |
| download | ayatana-indicator-display-3c0c8488f05430c7d2fc54009d928ffef36d1c61.tar.gz ayatana-indicator-display-3c0c8488f05430c7d2fc54009d928ffef36d1c61.tar.bz2 ayatana-indicator-display-3c0c8488f05430c7d2fc54009d928ffef36d1c61.zip | |
Merge branch 'tari01-pr/add-accountsservice'
Attributes GH PR #89: https://github.com/AyatanaIndicators/ayatana-indicator-display/pull/89
Diffstat (limited to 'data')
| -rw-r--r-- | data/50-org.ayatana.indicator.display.AccountsService.rules | 7 | ||||
| -rw-r--r-- | data/CMakeLists.txt | 19 | ||||
| -rw-r--r-- | data/org.ayatana.indicator.display.AccountsService.policy | 21 | ||||
| -rw-r--r-- | data/org.ayatana.indicator.display.AccountsService.xml | 17 |
4 files changed, 64 insertions, 0 deletions
diff --git a/data/50-org.ayatana.indicator.display.AccountsService.rules b/data/50-org.ayatana.indicator.display.AccountsService.rules new file mode 100644 index 0000000..d3126f3 --- /dev/null +++ b/data/50-org.ayatana.indicator.display.AccountsService.rules @@ -0,0 +1,7 @@ +// Allow LightDM to set AccountsService fields +polkit.addRule (function (action, subject) { + if (action.id == "org.ayatana.indicator.display.AccountsService.ModifyAnyUser" && subject.user == "lightdm") + { + return polkit.Result.YES; + } +}); diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 38ba788..451c9e8 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -64,3 +64,22 @@ install (FILES "${AYATANA_INDICATOR_FILE}" # ayatana-indicator-display-brightness-high install (DIRECTORY "icons/" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/status" FILES_MATCHING PATTERN "*.svg") + +if (ENABLE_COLOR_TEMP) + + # org.ayatana.indicator.display.AccountsService.xml + + install (FILES org.ayatana.indicator.display.AccountsService.xml DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/dbus-1/interfaces") + install (DIRECTORY DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/accountsservice/interfaces/") + install (CODE "message(STATUS \"Symlinking: \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/accountsservice/interfaces/org.ayatana.indicator.display.AccountsService.xml\")") + install (CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../../dbus-1/interfaces/org.ayatana.indicator.display.AccountsService.xml \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/accountsservice/interfaces/org.ayatana.indicator.display.AccountsService.xml)") + + # org.ayatana.indicator.display.AccountsService.policy + + install (FILES org.ayatana.indicator.display.AccountsService.policy DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/polkit-1/actions") + + # 50-org.ayatana.indicator.display.AccountsService.rules + + install (FILES 50-org.ayatana.indicator.display.AccountsService.rules DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/polkit-1/rules.d") + +endif () diff --git a/data/org.ayatana.indicator.display.AccountsService.policy b/data/org.ayatana.indicator.display.AccountsService.policy new file mode 100644 index 0000000..a2bff7a --- /dev/null +++ b/data/org.ayatana.indicator.display.AccountsService.policy @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + <action id="org.ayatana.indicator.display.AccountsService.ModifyOwnUser"> + <description>Set properties of own user</description> + <message>Authentication is required to set one's own indicator display 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.display.AccountsService.ModifyAnyUser"> + <description>Set properties of any user</description> + <message>Authentication is required to set another user's indicator display 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.display.AccountsService.xml b/data/org.ayatana.indicator.display.AccountsService.xml new file mode 100644 index 0000000..9e41ef2 --- /dev/null +++ b/data/org.ayatana.indicator.display.AccountsService.xml @@ -0,0 +1,17 @@ +<node> + <interface name="org.ayatana.indicator.display.AccountsService"> + <annotation name="org.freedesktop.Accounts.VendorExtension" value="true"/> + <annotation name="org.freedesktop.Accounts.Authentication.ChangeOwn" value="org.ayatana.indicator.display.AccountsService.ModifyOwnUser"/> + <annotation name="org.freedesktop.Accounts.Authentication.ReadAny" value="org.ayatana.indicator.display.AccountsService.ModifyAnyUser"/> + <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny" value="org.ayatana.indicator.display.AccountsService.ModifyAnyUser"/> + <property name="brightness" type="d" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue" value="1.0"/> + </property> + <property name="color-temp" type="q" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue" value="4913"/> + </property> + <property name="color-temp-profile" type="q" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue" value="2"/> + </property> + </interface> +</node> |
