From 9660d0b5c1cee59d7b34e989fc2da19b67167619 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 10 Feb 2014 11:54:07 -0600 Subject: Trying to put together all our account service pieces --- ....canonical.indicator.sound.AccountsService.pkla | 6 ++++ data/CMakeLists.txt | 32 ++++++++++++++++++++++ ...anonical.indicator.sound.AccountsService.policy | 23 ++++++++++++++++ ...m.canonical.indicator.sound.AccountsService.xml | 20 ++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 data/50-com.canonical.indicator.sound.AccountsService.pkla create mode 100644 data/com.canonical.indicator.sound.AccountsService.policy create mode 100644 data/com.canonical.indicator.sound.AccountsService.xml (limited to 'data') diff --git a/data/50-com.canonical.indicator.sound.AccountsService.pkla b/data/50-com.canonical.indicator.sound.AccountsService.pkla new file mode 100644 index 0000000..bbcca1e --- /dev/null +++ b/data/50-com.canonical.indicator.sound.AccountsService.pkla @@ -0,0 +1,6 @@ +[Allow LightDM to set Unity AccountsService fields] +Identity=unix-user:lightdm +Action=com.canonical.indicator.sound.AccountsService.ModifyAnyUser +ResultActive=yes +ResultInactive=yes +ResultAny=yes diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 565e652..9694a9e 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -61,3 +61,35 @@ install( ########################### add_schema ("com.canonical.indicator.sound.gschema.xml") + +########################### +# Accounts Service +########################### + + +set(POLKIT_LIB_DIR "${CMAKE_INSTALL_LOCALSTATEDIR}/lib/polkit-1") +set(POLKIT_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/polkit-1") +set(DBUS_IFACE_DIR "${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces") +set(ACCOUNTS_IFACE_DIR "${CMAKE_INSTALL_PREFIX}/share/accountsservice/interfaces") + +install(FILES com.canonical.indicator.sound.AccountsService.xml + DESTINATION "${DBUS_IFACE_DIR}" +) + +# Create accountsservice symlink for above dbus interface +install(CODE " + execute_process(COMMAND mkdir -p \"\$ENV{DESTDIR}${ACCOUNTS_IFACE_DIR}\") + execute_process(COMMAND ln -sf ../../dbus-1/interfaces/com.canonical.indicator.sound.AccountsService.xml \"\$ENV{DESTDIR}${ACCOUNTS_IFACE_DIR}\") +") + +install(FILES com.canonical.indicator.sound.AccountsService.policy +DESTINATION "${POLKIT_DATA_DIR}/actions" +) + +install(FILES 50-com.canonical.indicator.sound.AccountsService.pkla +DESTINATION "${POLKIT_LIB_DIR}/localauthority/10-vendor.d" +) + + + + diff --git a/data/com.canonical.indicator.sound.AccountsService.policy b/data/com.canonical.indicator.sound.AccountsService.policy new file mode 100644 index 0000000..4d0ee75 --- /dev/null +++ b/data/com.canonical.indicator.sound.AccountsService.policy @@ -0,0 +1,23 @@ + + + + + Set properties of own user + Authentication is required to set one's own indicator sound properties. + + yes + yes + yes + + + + + Set properties of any user + Authentication is required to set another user's indicator sound properties. + + no + no + no + + + diff --git a/data/com.canonical.indicator.sound.AccountsService.xml b/data/com.canonical.indicator.sound.AccountsService.xml new file mode 100644 index 0000000..bb73efd --- /dev/null +++ b/data/com.canonical.indicator.sound.AccountsService.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + -- cgit v1.2.3