diff options
Diffstat (limited to '99-consolekit.rules')
-rw-r--r-- | 99-consolekit.rules | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/99-consolekit.rules b/99-consolekit.rules new file mode 100644 index 000000000000..cb5807aeb3a1 --- /dev/null +++ b/99-consolekit.rules @@ -0,0 +1,19 @@ +polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) { + return polkit.Result.YES; + } +}); +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.hibernate" || + action.id == "org.freedesktop.login1.suspend") { + return polkit.Result.YES; + } +}); +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.upower.hibernate" || + action.id == "org.freedesktop.upower.suspend") { + return polkit.Result.YES; + } +}); |