[view] fix: always requesting the password on the initialization dialog when launched by the root user

This commit is contained in:
Vinicius Moreira
2021-11-04 18:08:34 -03:00
parent b2f8266bce
commit cea02dcd41
2 changed files with 4 additions and 2 deletions

View File

@@ -15,7 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixes
- AppImage
- not displaying the filter for any kind of file (*) when updating imported AppImages [#193](https://github.com/vinifmor/bauh/issues/193)
- UI
- always requesting the password on the initialization dialog when launched by the root user [#195](https://github.com/vinifmor/bauh/issues/195)
## [0.9.19] 2021-08-23

View File

@@ -13,6 +13,7 @@ from bauh import __app_name__
from bauh.api.abstract.context import ApplicationContext
from bauh.api.abstract.controller import SoftwareManager, SoftwareAction
from bauh.api.abstract.handler import TaskManager
from bauh.commons import user
from bauh.view.qt.components import new_spacer, QCustomToolbar
from bauh.view.qt.qt_utils import centralize
from bauh.view.qt.root import RootDialog
@@ -55,7 +56,7 @@ class Prepare(QThread, TaskManager):
def run(self):
root_pwd = None
if self.manager.requires_root(SoftwareAction.PREPARE, None):
if not user.is_root() and self.manager.requires_root(SoftwareAction.PREPARE, None):
ok, root_pwd = self.ask_password()
if not ok: