polkit.addRule(function(action, subject) { if ((action.id == "org.freedesktop.color-manager.create-device" || action.id == "org.freedesktop.color-manager.create-profile"|| action.id == "org.freedesktop.color-manager.delete-device" || action.id == "org.freedesktop.color-manager.delete-profile" || action.id == "org.freedesktop.color-manager.modify-device" || action.id == "org.freedesktop.color-manager.modify-profile" || action.id == "org.freedesktop.packagekit.system-sources-refresh") && subject.active == true) { return polkit.Result.YES; } return polkit.Result.NOT_HANDLED; });