diff options
author | Xiao-Long Chen | 2015-06-08 20:36:23 -0400 |
---|---|---|
committer | Xiao-Long Chen | 2015-06-08 20:36:23 -0400 |
commit | a5fb2529424d092a5d6488cb5596b32f723cb81e (patch) | |
tree | 7782abfded3c285e1c3cda189ee35dbf9af915e9 /50-unity-greeter.rules | |
download | aur-a5fb2529424d092a5d6488cb5596b32f723cb81e.tar.gz |
Import from old AUR
Diffstat (limited to '50-unity-greeter.rules')
-rw-r--r-- | 50-unity-greeter.rules | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/50-unity-greeter.rules b/50-unity-greeter.rules new file mode 100644 index 000000000000..1c1b5a344662 --- /dev/null +++ b/50-unity-greeter.rules @@ -0,0 +1,98 @@ +/* Original: + * [Disable Controlling of Network Devices] + * Identity=unix-user:lightdm + * Action=org.freedesktop.NetworkManager.enable-disable-network;org.freedesktop.NetworkManager.enable-disable-wifi;org.freedesktop.NetworkManager.enable-disable-wwan;org.freedesktop.NetworkManager.enable-disable-wimax; + * ResultActive=no + * ResultInactive=no + * ResultsAny=no + */ + +polkit.addRule(function(action, subject) { + if (subject.user == "lightdm" && ( + action.id == "org.freedesktop.NetworkManager.enable-disable-network" || + action.id == "org.freedesktop.NetworkManager.enable-disable-wifi" || + action.id == "org.freedesktop.NetworkManager.enable-disable-wwan" || + action.id == "org.freedesktop.NetworkManager.enable-disable-wimax")) { + return polkit.Result.NO; + } +}); + +/* Original: + * [Disable Sleep and Wake] + * Identity=unix-user:lightdm + * Action=org.freedesktop.NetworkManager.sleep-wake + * ResultActive=no + * ResultInactive=no + * ResultsAny=no + */ +polkit.addRule(function(action, subject) { + if (subject.user == "lightdm" && + action.id == "org.freedesktop.NetworkManager.sleep-wake") { + return polkit.Result.NO; + } +}); + +/* Original: + * [Disable WiFi Sharing] + * Identity=unix-user:lightdm + * Action=org.freedesktop.NetworkManager.wifi.share.protected;org.freedesktop.NetworkManager.wifi.share.open + * ResultActive=no + * ResultInactive=no + * ResultsAny=no + */ +polkit.addRule(function(action, subject) { + if (subject.user == "lightdm" && ( + action.id == "org.freedesktop.NetworkManager.wifi.share.protected" || + action.id == "org.freedesktop.NetworkManager.wifi.share.open")) { + return polkit.Result.NO; + } +}); + +/* Original: + * [Disable Settings Modifications] + * Identity=unix-user:lightdm + * Action=org.freedesktop.NetworkManager.settings.modify.own;org.freedesktop.NetworkManager.settings.modify.system;org.freedesktop.NetworkManager.settings.modify.hostname + * ResultActive=no + * ResultInactive=no + * ResultsAny=no + */ +polkit.addRule(function(action, subject) { + if (subject.user == "lightdm" && ( + action.id == "org.freedesktop.NetworkManager.settings.modify.own" || + action.id == "org.freedesktop.NetworkManager.settings.modify.system" || + action.id == "org.freedesktop.NetworkManager.settings.modify.hostname")) { + return polkit.Result.NO; + } +}); + +/* Original: + * [Disable User Connections] + * Identity=unix-user:lightdm + * Action=org.freedesktop.NetworkManager.use-user-connections + * ResultActive=no + * ResultInactive=no + * ResultsAny=no + */ +polkit.addRule(function(action, subject) { + if (subject.user == "lightdm" && + action.id == "org.freedesktop.NetworkManager.use-user-connections") { + return polkit.Result.NO; + } +}); + +/* Original: + * [Enable Controlling of Network Connections] + * Identity=unix-user:lightdm + * Action=org.freedesktop.NetworkManager.network-control + * ResultActive=yes + * ResultInactive=no + * ResultsAny=no + */ +polkit.addRule(function(action, subject) { + if (subject.user == "lightdm" && + subject.local && + subject.active && + action.id == "org.freedesktop.NetworkManager.network-control") { + return polkit.Result.YES; + } +}); |