diff options
author | Ryan Lortie <desrt@desrt.ca> | 2013-06-23 13:31:29 -0400 |
---|---|---|
committer | Stef Walter <stefw@redhat.com> | 2013-07-17 17:12:33 +0200 |
commit | a21ec621277cb8ee07b44d5d3d397b153a7f7d21 (patch) | |
tree | a870026f53c5252f904d603e3af6f618ec7968a6 | |
parent | 21de4bd55fdfd8e34295351666ab2fac71ac94d2 (diff) | |
download | accountsservice-a21ec621277cb8ee07b44d5d3d397b153a7f7d21.tar.gz |
Provide a sample extension interface
...and a polkit action file to go with.
https://bugs.freedesktop.org/show_bug.cgi?id=63733
-rw-r--r-- | doc/org.mydm.MyDisplayManager.Wallpaper.xml | 48 | ||||
-rw-r--r-- | doc/org.mydm.MyDisplayManager.policy | 14 |
2 files changed, 62 insertions, 0 deletions
diff --git a/doc/org.mydm.MyDisplayManager.Wallpaper.xml b/doc/org.mydm.MyDisplayManager.Wallpaper.xml new file mode 100644 index 0000000..1319f12 --- /dev/null +++ b/doc/org.mydm.MyDisplayManager.Wallpaper.xml @@ -0,0 +1,48 @@ +<node> + <!-- + 1. Copy this example to this directory: + # install -c -m 644 doc/org.mydm.MyDisplayManager.Wallpaper.xml $prefix/share/dbus-1/interfaces + 2. Link into accountsservice interfaces directory: + # install -d $prefix/share/accountsservice/interfaces/ + # ln -s ../../dbus-1/interfaces/org.mydm.MyDisplayManager.Wallpaper.xml $prefix/share/accountsservice/interfaces/ + 3. Reload accounts-daemon + --> + <interface name="org.mydm.MyDisplayManager.Wallpaper"> + + <annotation name="org.freedesktop.Accounts.VendorExtension" value="true"/> + + <!-- defaults to always allowed --> + <!-- + <annotation name="org.freedesktop.Accounts.Authentication.ReadOwn" + value="org.mydm.MyDisplayManager.ReadWallpaper"/> + <annotation name="org.freedesktop.Accounts.Authentication.ReadAny" + value="org.mydm.MyDisplayManager.ReadWallpaper"/> + --> + + <!-- defaults to org.freedesktop.accounts.user-administration --> + <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny" + value="org.mydm.MyDisplayManager.ModifyWallpaper"/> + + <!-- defaults to org.freedesktop.accounts.change-own-user-data --> + <!-- + <annotation name="org.freedesktop.Accounts.Authentication.ChangeOwn" + value="org.mydm.MyDisplayManager.ModifyWallpaper"/> + --> + + <property name="filename" type="s" access="readwrite"/> + + <property name="display-mode" type="s" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue.String" value="zoom"/> + </property> + + <property name="background-color" type="(iii)" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue" value="(0xdd, 0x48, 0x14)"/> + </property> + + </interface> +</node> + +<!-- must install file in XDG_DATA_DIRS/dbus-1/interfaces + and symlink to it from XDG_DATA_DIRS/accountsservice/interface + with the same basename, using a relative path starting '../../dbus-1/interfaces/" + --> diff --git a/doc/org.mydm.MyDisplayManager.policy b/doc/org.mydm.MyDisplayManager.policy new file mode 100644 index 0000000..14fb229 --- /dev/null +++ b/doc/org.mydm.MyDisplayManager.policy @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<policyconfig> + + <action id="org.mydm.MyDisplayManager.ModifyWallpaper"> + <description>Set wallpaper of any user</description> + <message>Authentication is required to set another user's wallpaper.</message> + <defaults> + <allow_any>auth_admin_keep</allow_any> + <allow_inactive>auth_admin_keep</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> +</policyconfig> |