mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-24 02:20:58 +08:00
Disallow password related options on non compiled or non private builds
This commit is contained in:
parent
191fb39ce9
commit
9d1cc4536d
3 changed files with 9 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ __intname__ = "npbackup.gui.config"
|
||||||
__author__ = "Orsiris de Jong"
|
__author__ = "Orsiris de Jong"
|
||||||
__copyright__ = "Copyright (C) 2022-2023 NetInvent"
|
__copyright__ = "Copyright (C) 2022-2023 NetInvent"
|
||||||
__license__ = "GPL-3.0-only"
|
__license__ = "GPL-3.0-only"
|
||||||
__build__ = "2023020802"
|
__build__ = "2023040401"
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
@ -16,6 +16,7 @@ import PySimpleGUI as sg
|
||||||
import npbackup.configuration as configuration
|
import npbackup.configuration as configuration
|
||||||
from npbackup.core.i18n_helper import _t
|
from npbackup.core.i18n_helper import _t
|
||||||
from npbackup.path_helper import CURRENT_EXECUTABLE
|
from npbackup.path_helper import CURRENT_EXECUTABLE
|
||||||
|
from npbackup.core.nuitka_helper import IS_COMPILED
|
||||||
|
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
from npbackup.windows.task import create_scheduled_task
|
from npbackup.windows.task import create_scheduled_task
|
||||||
|
|
@ -24,6 +25,9 @@ logger = getLogger(__intname__)
|
||||||
|
|
||||||
|
|
||||||
def ask_backup_admin_password(config_dict) -> bool:
|
def ask_backup_admin_password(config_dict) -> bool:
|
||||||
|
if not IS_COMPILED:
|
||||||
|
sg.PopupError(_t("config_gui.not_allowed_on_not_compiled"))
|
||||||
|
return False
|
||||||
try:
|
try:
|
||||||
backup_admin_password = config_dict["options"]["backup_admin_password"]
|
backup_admin_password = config_dict["options"]["backup_admin_password"]
|
||||||
if not backup_admin_password:
|
if not backup_admin_password:
|
||||||
|
|
|
||||||
|
|
@ -75,4 +75,5 @@ en:
|
||||||
machine_id: Machine identifier
|
machine_id: Machine identifier
|
||||||
machine_group: Machine group
|
machine_group: Machine group
|
||||||
|
|
||||||
show_decrypted: Show decrypted
|
show_decrypted: Show decrypted
|
||||||
|
not_allowed_on_not_compiled: Using this option is not allowed on non compiled or non private builds
|
||||||
|
|
@ -75,4 +75,5 @@ fr:
|
||||||
machine_id: Identificateur machine
|
machine_id: Identificateur machine
|
||||||
machine_group: Groupe machine
|
machine_group: Groupe machine
|
||||||
|
|
||||||
show_decrypted: Voir déchiffré
|
show_decrypted: Voir déchiffré
|
||||||
|
not_allowed_on_not_compiled: Cette option n'est pas permise sur une version non compilée ou non privée
|
||||||
Loading…
Add table
Reference in a new issue