polkit.addRule( function(action, subject) { if ( (action.id == "org.freedesktop.consolekit.reboot" || action.id == "org.freedesktop.consolekit.reboot-multiple-sessions" || action.id == "org.freedesktop.consolekit.power-off" || action.id == "org.freedesktop.consolekit.power-off-multiple-sessions") && subject.isInGroup("power") ) { return polkit.Result.YES; } } );