diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-21 20:22:31 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-21 20:22:31 -0500 |
commit | ec9ee033ba2c22d6c1a6b119ba6fe0525810d9bc (patch) | |
tree | 807c16c000b254ea328289812ff432836383d4c9 /libre/xbmc-libre/polkit.rules | |
parent | 182f7683a74e0838c85245376af173ecb46fd8d4 (diff) | |
parent | 4bd60a24f1976e63cf40667397200d568f479e48 (diff) |
Merge branch 'master' of https://projects.parabolagnulinux.org/abslibre
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; + } + } }); |