diff options
author | heqnx <root@heqnx.com> | 2025-05-26 08:54:15 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-05-26 08:54:15 +0300 |
commit | b702fe9f7f8bf423f753ae89b9617aab2372c05e (patch) | |
tree | 09f1237b282709ef51e741a74b21005447e061d6 /roles/xrdp/files/xrdp_polkit.rules | |
parent | 08134048cb9a85508042cabd9aa3a39849eca2be (diff) | |
download | ansible-playbooks-b702fe9f7f8bf423f753ae89b9617aab2372c05e.tar.gz ansible-playbooks-b702fe9f7f8bf423f753ae89b9617aab2372c05e.zip |
added xrdp, added example configs, removing main ones
Diffstat (limited to 'roles/xrdp/files/xrdp_polkit.rules')
-rw-r--r-- | roles/xrdp/files/xrdp_polkit.rules | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/roles/xrdp/files/xrdp_polkit.rules b/roles/xrdp/files/xrdp_polkit.rules new file mode 100644 index 0000000..c1fecde --- /dev/null +++ b/roles/xrdp/files/xrdp_polkit.rules @@ -0,0 +1,31 @@ +polkit.addRule(function(action, subject) { + if (subject.user && subject.user !== "root" && + (action.id == "org.freedesktop.color-manager.create-device" || + action.id == "org.freedesktop.color-manager.create-profile" || + action.id == "org.freedesktop.color-manager.delete-device" || + action.id == "org.freedesktop.color-manager.delete-profile" || + action.id == "org.freedesktop.color-manager.modify-device" || + action.id == "org.freedesktop.color-manager.modify-profile" || + action.id == "org.debian.apt.update-cache")) { + return polkit.Result.YES; + } +}); + +polkit.addRule(function(action, subject) { + if (subject.user && subject.user !== "root" && + (action.id == "org.freedesktop.NetworkManager.settings.modify.system" || + action.id == "org.freedesktop.NetworkManager.network-control")) { + return polkit.Result.YES; + } +}); + +polkit.addRule(function(action, subject) { + if (subject.user && subject.user !== "root" && + action.id.match(/^org\.freedesktop\.login1\.(reboot|power-off|suspend)/)) { + if (subject.active) { + return polkit.Result.YES; + } else { + return polkit.Result.NO; + } + } +}); |