So I know I REALLY shouldn't comment on patches late at night so I hope what I'm about to say isn't stupid... but surely that allows *anyone* to read the reports without a password, no? I don't think polkit has any proper way to do what you want to do. We should really change that, but in the meantime, you have to do it in js, like gnome-control-center does. Something like this:

polkit.addRule(function(action, subject) {
        if (action.id == "org.freedesktop.whatever" &&
            subject.local &&
            subject.active &&
// Doesn't work at all for Debian/Ubuntu which uses "admin" not "wheel" // And openSUSE just deletes these js rules once they're discovered // And the polkit documentation is pretty clear you should not use them
            subject.isInGroup ("wheel")) {
                    return polkit.Result.YES;
            }
});

Reply via email to