How to check if `action.id` starts with `org.freedesktop.NetworkManager`?
Jul 26, 8:25pm
To check if the action.id starts with the string "org.freedesktop.NetworkManager" in your Polkit rule, you can use the JavaScript startsWith() method. Here's how you can modify your rule to include this check:
action.id.startsWith("org.freedesktop.NetworkManager"): This checks if the action.id begins with the specified string.
The rest of the rule remains the same, ensuring that the user benjamin_loison is allowed to perform actions where the action.id starts with "org.freedesktop.NetworkManager".
This approach is clean and directly leverages JavaScript's built-in string methods.
Jul 26, 8:25pm
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.