Route TUI controls through polkit
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user