From dbdc7219dee4de567841be62e64e5d6edd6fa6d7 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 18 Jul 2025 15:16:13 +0200 Subject: org.freedesktop.machine1.host-shell: simplify if clause --- modules/org.freedesktop.machine1.host-shell.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules/org.freedesktop.machine1.host-shell.nix') 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; + } + } } }()); ''; -- cgit v1.2.3