# Calculate comment=// path=/etc/polkit-1/rules.d pkg(xfce-base/xfce4-session)!=
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */

// Allow to use the suspend and the hibernation with block session in XFCE
//

polkit.addRule(function(action, subject) {
    if (/^org\.freedesktop\.upower\.(suspend|hibernate)$/.test(action.id) &&
        subject.local) {
        return polkit.Result.YES;
    }
});
