diff options
| author | tv <tv@krebsco.de> | 2025-07-18 15:16:13 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2025-07-18 15:16:13 +0200 |
| commit | dbdc7219dee4de567841be62e64e5d6edd6fa6d7 (patch) | |
| tree | bdcf1c8e9e85c8f2344f34b83e5dd6c502675abd /modules/org.freedesktop.machine1.host-shell.nix | |
| parent | f8d750f864aef25ae54293bbfde10dc3183c9e6b (diff) | |
org.freedesktop.machine1.host-shell: simplify if clause
Diffstat (limited to 'modules/org.freedesktop.machine1.host-shell.nix')
| -rw-r--r-- | modules/org.freedesktop.machine1.host-shell.nix | 8 |
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; + } + } } }()); ''; |
