mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[view] fix: always requesting the password on the initialization dialog when launched by the root user
This commit is contained in:
@@ -15,7 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
### Fixes
|
### Fixes
|
||||||
- AppImage
|
- AppImage
|
||||||
- not displaying the filter for any kind of file (*) when updating imported AppImages [#193](https://github.com/vinifmor/bauh/issues/193)
|
- 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
|
## [0.9.19] 2021-08-23
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ from bauh import __app_name__
|
|||||||
from bauh.api.abstract.context import ApplicationContext
|
from bauh.api.abstract.context import ApplicationContext
|
||||||
from bauh.api.abstract.controller import SoftwareManager, SoftwareAction
|
from bauh.api.abstract.controller import SoftwareManager, SoftwareAction
|
||||||
from bauh.api.abstract.handler import TaskManager
|
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.components import new_spacer, QCustomToolbar
|
||||||
from bauh.view.qt.qt_utils import centralize
|
from bauh.view.qt.qt_utils import centralize
|
||||||
from bauh.view.qt.root import RootDialog
|
from bauh.view.qt.root import RootDialog
|
||||||
@@ -55,7 +56,7 @@ class Prepare(QThread, TaskManager):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
root_pwd = None
|
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()
|
ok, root_pwd = self.ask_password()
|
||||||
|
|
||||||
if not ok:
|
if not ok:
|
||||||
|
|||||||
Reference in New Issue
Block a user