Put your rules in /etc/polkit-1/rules.d/*.rules. See the polkit(8) manpage for rule syntax.
-
-
Save leojava/6f8faea578372f76fc7d2106a9686e62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Copy this to /etc/polkit-1/rules.d/packagekit-restrict.rules | |
| */ | |
| polkit.addRule(function(action, subject) { | |
| if (/^org\.freedesktop\.packagekit\./.test(action.id)) { | |
| if (subject.local && subject.active && subject.isInGroup("wheel")) { | |
| return polkit.Result.YES; | |
| } else { | |
| return polkit.Result.AUTH_ADMIN_KEEP; | |
| } | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Copy this to /etc/polkit-1/rules.d/allow-mount-internal.rules | |
| */ | |
| polkit.addRule(function(action, subject) { | |
| if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" || | |
| action.id == "org.freedesktop.udisks.filesystem-mount-system-internal") && | |
| subject.local && subject.active && subject.isInGroup("users")) { | |
| return polkit.Result.YES; | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment