summaryrefslogtreecommitdiffstats
path: root/source/a/elogind/10-enable-elogind-power.rules
blob: db49920626ff442b7a61b2035e873f3c74ba79f8 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
polkit.addRule(
  function(action, subject) {
    if ( (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;
    }
  }
);