Debian Codegraph @

policy/org.freedesktop.packagekit.rules

raw
1 // Allows users belonging to privileged groups to trigger system updates
2 // without a password prompt.
3
4 polkit.addRule(function(action, subject) {
5 if ((action.id == "org.freedesktop.packagekit.system-update" ||
6 action.id == "org.freedesktop.packagekit.trigger-offline-update" ||
7 action.id == "org.freedesktop.packagekit.trigger-offline-upgrade") &&
8 subject.active == true && subject.local == true &&
9 (subject.isInGroup("wheel") || subject.isInGroup("sudo"))) {
10 return polkit.Result.YES;
11 }
12 });