Route TUI controls through polkit

This commit is contained in:
xavierk
2026-09-15 15:47:40 +05:30
parent efcfd266b7
commit 967ba6964f
2 changed files with 19 additions and 0 deletions
+3
View File
@@ -14,6 +14,7 @@ Criteria: TUI-1, TUI-2, TUI-4, CI-1, CI-2, CI-4, IN-3, LC-6, LC-8.
"""
from __future__ import annotations
import os
import sqlite3
import subprocess
import sys
@@ -1454,6 +1455,8 @@ class FenrisTuiApp(App):
cmd = [self.helper_path, operation]
if extra_args:
cmd.extend(extra_args)
if os.geteuid() != 0:
cmd.insert(0, "pkexec")
try:
with self.suspend():