aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/50-org.Arctica-Project.arctica-greeter.rules33
1 files changed, 33 insertions, 0 deletions
diff --git a/data/50-org.Arctica-Project.arctica-greeter.rules b/data/50-org.Arctica-Project.arctica-greeter.rules
new file mode 100644
index 0000000..b194628
--- /dev/null
+++ b/data/50-org.Arctica-Project.arctica-greeter.rules
@@ -0,0 +1,33 @@
+polkit.addRule (function (action, subject) {
+ if (subject.user == "lightdm") {
+ switch (action.id) {
+ // Disable Controlling of Network Devices
+ case 'org.freedesktop.NetworkManager.enable-disable-network':
+ case 'org.freedesktop.NetworkManager.enable-disable-wifi':
+ case 'org.freedesktop.NetworkManager.enable-disable-wwan':
+ case 'org.freedesktop.NetworkManager.enable-disable-wimax':
+ // Disable Sleep and Wake
+ case 'org.freedesktop.NetworkManager.sleep-wake':
+ // Disable WiFi Sharing
+ case 'org.freedesktop.NetworkManager.wifi.share.protected':
+ case 'org.freedesktop.NetworkManager.wifi.share.open':
+ // Disable Settings Modifications
+ case 'org.freedesktop.NetworkManager.settings.modify.own':
+ case 'org.freedesktop.NetworkManager.settings.modify.system':
+ case 'org.freedesktop.NetworkManager.settings.modify.hostname':
+ // Disable User Connections
+ case 'org.freedesktop.NetworkManager.use-user-connections':
+ // Enable Controlling of Network Connections
+ case 'org.freedesktop.NetworkManager.network-control':
+ return polkit.Result.NO;
+ break;
+ default:
+ /*
+ * Do nothing... for now.
+ *
+ * This means that polkit will continue scanning for other rules.
+ */
+ break;
+ }
+ }
+});