Add API to control whether polkit authorisation checks allow interaction #14

Merged
merged 3 commits into from Sep 4, 2017

Conversation

Projects
None yet
2 participants
Contributor

jhenstridge commented Aug 24, 2017

This branch is intended to complement snapcore/snapd#3795 by adding set_allow_interaction and get_allow_interaction APIs to SnapdClient. The idea is to let the client decide whether snapd's polkit authorisation checks should allow interaction or not.

One question is what the default should be for snapd-glib. At present I've set it to default to allow interaction on the assumption that most users of the library will be graphical. But it would be pretty easy to disallow interaction by default.

The change should be backward compatible with old versions of snapd: they will simply ignore the extra request header.

Contributor

robert-ancell commented Aug 28, 2017

Looks good to me, happy to merge once snapd approves the use of this field.

Contributor

robert-ancell commented Aug 30, 2017

I brought over some of your test case changes into master, so this branch will have to be rebased again.

Contributor

jhenstridge commented Aug 31, 2017

I've updated the branch, also changing the value we set the request header to, as requested in the snapd PR.

@robert-ancell robert-ancell merged commit 5453355 into snapcore:master Sep 4, 2017

Contributor

robert-ancell commented Sep 4, 2017

I squashed the commits and fixed up some documentation issues in master for this, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment