summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2025-07-18 15:16:13 +0200
committertv <tv@krebsco.de>2025-07-18 15:16:13 +0200
commitdbdc7219dee4de567841be62e64e5d6edd6fa6d7 (patch)
treebdcf1c8e9e85c8f2344f34b83e5dd6c502675abd
parentf8d750f864aef25ae54293bbfde10dc3183c9e6b (diff)
org.freedesktop.machine1.host-shell: simplify if clause
-rw-r--r--modules/org.freedesktop.machine1.host-shell.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/org.freedesktop.machine1.host-shell.nix b/modules/org.freedesktop.machine1.host-shell.nix
index 1556ccf..3491453 100644
--- a/modules/org.freedesktop.machine1.host-shell.nix
+++ b/modules/org.freedesktop.machine1.host-shell.nix
@@ -20,9 +20,11 @@
polkit.addRule(function () {
const access = ${builtins.toJSON cfg.access};
return function (action, subject) {
- if (action.id === "org.freedesktop.machine1.host-shell"
- && (access[subject.user]||{})[action.lookup("user")])
- return polkit.Result.YES;
+ if (action.id === "org.freedesktop.machine1.host-shell") {
+ if ((access[subject.user]||{})[action.lookup("user")]) {
+ return polkit.Result.YES;
+ }
+ }
}
}());
'';