Skip to content

Instantly share code, notes, and snippets.

@kingcody
Forked from detrohutt/40-custom.rules
Last active December 28, 2015 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kingcody/7478428 to your computer and use it in GitHub Desktop.
Save kingcody/7478428 to your computer and use it in GitHub Desktop.
// Custom user-defined rules for polkit
//
// See the polkit(8) man page for more information
// about configuring polkit.
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.suspend" ||
action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
action.id == "org.freedesktop.login1.hibernate" ||
action.id == "org.freedesktop.login1.hibernate-multiple-sessions" ||
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions" &&
subject.isInGroup("power")) {
return polkit.Result.YES;
}
});
@kingcody
Copy link
Author

Removing duplicates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment