summaryrefslogtreecommitdiffstats
path: root/core/modules/lightdm-greeter-bwlp/data/etc/polkit-1/rules.d/50-slx-lightdm-powerctl.rules
blob: ec842b7bcc8e3acafda01bdf8ce40afd3c187766 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.power-off" ||
        action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
        action.id == "org.freedesktop.login1.reboot" ||
        action.id == "org.freedesktop.login1.reboot-multiple-sessions"
    ) {
        if (subject.user === "lightdm")
            return polkit.Result.YES;
        return polkit.Result.NOT_HANDLED;
    }
});