1
0
Fork 0
mirror of synced 2024-11-22 18:15:37 -05:00
garuda-common-settings/usr/share/polkit-1/rules.d/99-garuda.rules

97 lines
2.9 KiB
Text

polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 &&
subject.isInGroup("wheel"))
{
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" ||
action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat" ||
action.id == "org.freedesktop.udisks.filesystem-fstab") &&
subject.isInGroup("wheel"))
{
return polkit.Result.YES;
}
});
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" ||
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") &&
subject.isInGroup("wheel"))
{
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.upower.hibernate" ||
action.id == "org.freedesktop.upower.suspend") &&
subject.isInGroup("wheel"))
{
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") &&
subject.isInGroup("wheel"))
{
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.archlinux.pkexec.gparted" ||
action.id == "org.kde.kpmcore.externalcommand.init") &&
subject.isInGroup("wheel"))
{
return polkit.Result.YES;
}
});
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;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.corectrl.helper.init" ||
action.id == "org.corectrl.helperkiller.init") &&
subject.isInGroup("wheel"))
{
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "in.teejeetech.pkexec.timeshift-gtk" ||
action.id == "in.teejeetech.pkexec.timeshift") &&
subject.isInGroup("wheel"))
{
return polkit.Result.YES;
}
});