2021-02-04 02:49:38 -05:00
|
|
|
polkit.addRule(function(action, subject) {
|
2021-02-19 07:19:38 -05:00
|
|
|
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 &&
|
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
2021-02-04 02:49:38 -05:00
|
|
|
return polkit.Result.YES;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
polkit.addRule(function(action, subject) {
|
|
|
|
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
|
|
|
|
action.id == "org.freedesktop.udisks2.filesystem-mount" ||
|
2021-02-19 07:24:11 -05:00
|
|
|
action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat" ||
|
2021-02-04 02:49:38 -05:00
|
|
|
action.id == "org.freedesktop.udisks.filesystem-fstab") &&
|
2021-02-19 07:19:38 -05:00
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
2021-02-04 02:49:38 -05:00
|
|
|
return polkit.Result.YES;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
polkit.addRule(function(action, subject) {
|
2021-02-19 07:19:38 -05:00
|
|
|
if ((action.id == "org.freedesktop.login1.power-off" ||
|
2021-02-19 07:24:11 -05:00
|
|
|
action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
|
|
|
|
action.id == "org.freedesktop.login1.reboot" ||
|
|
|
|
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
|
|
|
|
action.id == "org.freedesktop.login1.hibernate" ||
|
|
|
|
action.id == "org.freedesktop.login1.hibernate-multiple-sessions" ||
|
|
|
|
action.id == "org.freedesktop.login1.suspend" ||
|
|
|
|
action.id == "org.freedesktop.login1.suspend-multiple-sessions") &&
|
2021-02-19 07:19:38 -05:00
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
2021-02-04 02:49:38 -05:00
|
|
|
return polkit.Result.YES;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
polkit.addRule(function(action, subject) {
|
2021-02-19 07:19:38 -05:00
|
|
|
if ((action.id == "org.freedesktop.upower.hibernate" ||
|
2021-02-19 07:24:11 -05:00
|
|
|
action.id == "org.freedesktop.upower.suspend") &&
|
2021-02-19 07:19:38 -05:00
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
2021-02-04 02:49:38 -05:00
|
|
|
return polkit.Result.YES;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
polkit.addRule(function(action, subject) {
|
|
|
|
if ((action.id == "org.blueman.network.setup" ||
|
|
|
|
action.id == "org.blueman.dhcp.client" ||
|
|
|
|
action.id == "org.blueman.rfkill.setstate" ||
|
|
|
|
action.id == "org.blueman.pppd.pppconnect") &&
|
2021-02-19 07:19:38 -05:00
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
2021-02-04 02:49:38 -05:00
|
|
|
return polkit.Result.YES;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
polkit.addRule(function(action, subject) {
|
|
|
|
if ((action.id == "org.archlinux.pkexec.gparted" ||
|
2021-02-19 07:24:11 -05:00
|
|
|
action.id == "org.kde.kpmcore.externalcommand.init") &&
|
2021-02-04 02:49:38 -05:00
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
|
|
|
return polkit.Result.YES;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2021-02-19 07:19:38 -05:00
|
|
|
polkit.addRule(function(action, subject) {
|
|
|
|
if ((action.id == "org.opensuse.cupspkhelper.mechanism.all-edit") &&
|
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
|
|
|
return polkit.Result.YES;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
polkit.addRule(function(action, subject) {
|
|
|
|
if ((action.id == "org.libvirt.unix.manage") &&
|
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
|
|
|
return polkit.Result.YES;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2021-02-04 02:49:38 -05:00
|
|
|
polkit.addRule(function(action, subject) {
|
|
|
|
if ((action.id == "org.corectrl.helper.init" ||
|
|
|
|
action.id == "org.corectrl.helperkiller.init") &&
|
2021-02-19 07:19:38 -05:00
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
2021-04-06 06:05:51 -04:00
|
|
|
return polkit.Result.YES;
|
2021-02-04 02:49:38 -05:00
|
|
|
}
|
|
|
|
});
|
2021-04-05 08:20:23 -04:00
|
|
|
|
|
|
|
polkit.addRule(function(action, subject) {
|
|
|
|
if ((action.id == "in.teejeetech.pkexec.timeshift-gtk" ||
|
|
|
|
action.id == "in.teejeetech.pkexec.timeshift") &&
|
|
|
|
subject.isInGroup("wheel"))
|
|
|
|
{
|
2021-04-06 06:05:51 -04:00
|
|
|
return polkit.Result.YES;
|
2021-04-05 08:20:23 -04:00
|
|
|
}
|
|
|
|
});
|