summaryrefslogtreecommitdiff
path: root/libre/xbmc-libre/polkit.rules
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-02-01 04:45:05 -0200
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-02-01 04:45:05 -0200
commit52dd108836155b53454bd95a4a9dbd0c104b79d3 (patch)
treec87f4853b64b5333f7a5aa97bdb5823d34628e21 /libre/xbmc-libre/polkit.rules
parent5af0fca430a07bda87310d2ef1a33b6cdb31f732 (diff)
parente2abfecd7d65712f41cd27c8f5ae8d69c478f214 (diff)
downloadabslibre-52dd108836155b53454bd95a4a9dbd0c104b79d3.tar.gz
abslibre-52dd108836155b53454bd95a4a9dbd0c104b79d3.tar.bz2
abslibre-52dd108836155b53454bd95a4a9dbd0c104b79d3.zip
Merge branch 'master' of ssh://projects.parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'libre/xbmc-libre/polkit.rules')
-rw-r--r--libre/xbmc-libre/polkit.rules19
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;
+ }
+ }
});