summaryrefslogtreecommitdiff
path: root/testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules
blob: 2a8a5a70b9df704455e520394ce702d12f569339 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
    }
  }
);