system-helper: Do not ask for password when removing apps/runtimes

As it's already done for installing an app or runtime, we shouldn't ask
privileged users to authenticate in order to remove them.
tingping/wmclass
Joaquim Rocha 2016-12-06 22:27:07 +01:00 committed by Alexander Larsson
parent d3715463f2
commit 1a1ec16a4f
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.Flatpak.app-install" ||
action.id == "org.freedesktop.Flatpak.runtime-install") &&
action.id == "org.freedesktop.Flatpak.runtime-install"||
action.id == "org.freedesktop.Flatpak.app-uninstall" ||
action.id == "org.freedesktop.Flatpak.runtime-uninstall") &&
subject.active == true && subject.local == true &&
subject.isInGroup("@privileged_group@")) {
return polkit.Result.YES;