summarylogtreecommitdiffstats
path: root/polkit.rules
blob: 670a01a8033412e175841ebd7a0e41bb759a35fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
polkit.addRule(function(action, subject) {
    if (subject.user == "kodi") {
        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;
        }
        if (action.id.indexOf("org.freedesktop.upower.") == 0) {
            return polkit.Result.YES;
        }
    }
});