summaryrefslogtreecommitdiff
path: root/testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules
diff options
context:
space:
mode:
Diffstat (limited to 'testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules')
-rw-r--r--testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules12
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules b/testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules
new file mode 100644
index 00000000..2a8a5a70
--- /dev/null
+++ b/testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules
@@ -0,0 +1,12 @@
+polkit.addRule(
+ function(action, subject) {
+ if ( (action.id == "org.freedesktop.consolekit.system.restart" ||
+ action.id == "org.freedesktop.consolekit.system.restart-multiple-users" ||
+ action.id == "org.freedesktop.consolekit.system.stop" ||
+ action.id == "org.freedesktop.consolekit.system.stop-multiple-users")
+ && subject.isInGroup("power") ) {
+ return polkit.Result.YES;
+ }
+ }
+);
+