Skip to content

Instantly share code, notes, and snippets.

@demmm
Created July 6, 2026 17:59
Show Gist options
  • Select an option

  • Save demmm/628cfb3852fb83058ded114806b3100f to your computer and use it in GitHub Desktop.

Select an option

Save demmm/628cfb3852fb83058ded114806b3100f to your computer and use it in GitHub Desktop.
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
// Elogind
if (action.id.indexOf("org.freedesktop.login1.") === 0) {
return polkit.Result.YES;
}
// Network management
if (action.id.indexOf("org.freedesktop.NetworkManager.") === 0) {
return polkit.Result.YES;
}
// Flatpak
if (action.id.indexOf("org.freedesktop.Flatpak.") === 0) {
return polkit.Result.YES;
}
// Noctalia Greeter
if (action.id.indexOf("org.noctalia.greeter.") === 0) {
return polkit.Result.YES;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment