Update polkit rules to allow sudo users to change wifi config #196
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR offers a fix for #183.
For a complete solution, we need to implement #184.
Context: The following system polkit rules is interfering with our custom design polkit rule:
This rule specifically requires users in the sudo group to only modify system settings when they are both
local
andactive
, and it only covers thesettings.modify.system
action.Based on the polkit documentation, local and active are attributes of the Subject type that indicate the session status:
local (boolean):
Set to true only if the seat is local
A "local" seat means the user is physically present at the machine (like sitting at a desktop/laptop)
As opposed to a remote connection (like SSH or VNC)
active (boolean):
Set to true only if the session is active
An "active" session means it's currently being used
For example, in a multi-user system with multiple logged-in users, only the currently focused/active user session would be marked as active
If you're logged in but switched to another user's session, your session would be inactive
We need a special rule handling as below: