diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-01-21 20:27:02 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-01-21 20:27:02 -0200 |
commit | 4bd60a24f1976e63cf40667397200d568f479e48 (patch) | |
tree | 7c4fa41997b6b78e412587de9dd3666bd62a3ecd /libre/xbmc-libre/polkit.rules | |
parent | baa13682080bff676a2a61e605479959713ee26f (diff) | |
download | abslibre-4bd60a24f1976e63cf40667397200d568f479e48.tar.gz abslibre-4bd60a24f1976e63cf40667397200d568f479e48.tar.bz2 abslibre-4bd60a24f1976e63cf40667397200d568f479e48.zip |
xbmc-libre-12.3-7: fix FS#38575 => https://bugs.archlinux.org/task/38575
Diffstat (limited to 'libre/xbmc-libre/polkit.rules')
-rw-r--r-- | libre/xbmc-libre/polkit.rules | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libre/xbmc-libre/polkit.rules b/libre/xbmc-libre/polkit.rules index 5bc7e69f5..4b6d0fda0 100644 --- a/libre/xbmc-libre/polkit.rules +++ b/libre/xbmc-libre/polkit.rules @@ -1,11 +1,12 @@ polkit.addRule(function(action, subject) { - if (action.id.match("org.freedesktop.login1.") && subject.isInGroup("power")) { - return polkit.Result.YES; - } -}); - -polkit.addRule(function(action, subject) { - if (action.id.indexOf("org.freedesktop.udisks") == 0 && subject.isInGroup("storage")) { - return polkit.Result.YES; - } + if (subject.user == "xbmc") { + polkit.log("action=" + action); + polkit.log("subject=" + subject); + if (action.id.indexOf("org.freedesktop.login1.") == 0) { + return polkit.Result.YES; + } + if (action.id.indexOf("org.freedesktop.udisks.") == 0) { + return polkit.Result.YES; + } + } }); |