|
|
|
@ -16,6 +16,7 @@ from . import BackwardCompatibility # Backward compatibility from v1.1.13
|
|
|
|
|
from . import Core
|
|
|
|
|
from . import Managers
|
|
|
|
|
from ..Tools import License
|
|
|
|
|
from ..Utils import Dictionary
|
|
|
|
|
|
|
|
|
|
if CrossOS.IS_WINDOWS_BOOL: from subprocess import CREATE_NEW_CONSOLE
|
|
|
|
|
|
|
|
|
@ -808,7 +809,7 @@ def OrchestratorSessionRestore(inGSettings=None):
|
|
|
|
|
inGSettings["StorageDict"] = {}
|
|
|
|
|
with open('_SessionLast_StorageDict.pickle', 'rb') as lFile:
|
|
|
|
|
lStorageDictDumpDict = pickle.load(lFile)
|
|
|
|
|
Server.__ComplexDictMerge2to1Overwrite__(in1Dict=inGSettings["StorageDict"],
|
|
|
|
|
Dictionary.MergeNoException(in1Dict=inGSettings["StorageDict"],
|
|
|
|
|
in2Dict=lStorageDictDumpDict) # Merge dict 2 into dict 1
|
|
|
|
|
if lL: lL.warning(f"Словарь StorageDict был восстановлен из прошлой сессии оркестратора")
|
|
|
|
|
os.remove("_SessionLast_StorageDict.pickle") # remove the temp file
|
|
|
|
@ -820,7 +821,7 @@ def OrchestratorSessionRestore(inGSettings=None):
|
|
|
|
|
inGSettings["ManagersProcessDict"] = {}
|
|
|
|
|
with open('_SessionLast_GSettings.pickle', 'rb') as lFile:
|
|
|
|
|
lStorageDictDumpDict = pickle.load(lFile)
|
|
|
|
|
Server.__ComplexDictMerge2to1Overwrite__(in1Dict=inGSettings,
|
|
|
|
|
Dictionary.MergeNoException(in1Dict=inGSettings,
|
|
|
|
|
in2Dict=lStorageDictDumpDict) # Merge dict 2 into dict 1
|
|
|
|
|
if lL: lL.warning(f"Словарь GSettings был восстановлен из прошлой сессии оркестратора")
|
|
|
|
|
os.remove("_SessionLast_GSettings.pickle") # remove the temp file
|
|
|
|
@ -878,7 +879,7 @@ def UACUpdate(inADLoginStr, inADStr="", inADIsDefaultBool=True, inURLList=None,
|
|
|
|
|
# Check RoleHierarchyAllowedDict in gSettings for the old role hierarchy - include in result.
|
|
|
|
|
if lUserTurple in inGSettings["ServerDict"]["AccessUsers"]["RuleDomainUserDict"] and "RoleHierarchyAllowedDict" in inGSettings["ServerDict"]["AccessUsers"]["RuleDomainUserDict"][lUserTurple]:
|
|
|
|
|
lRoleHierarchyAllowedOLDDict = inGSettings["ServerDict"]["AccessUsers"]["RuleDomainUserDict"][lUserTurple]["RoleHierarchyAllowedDict"]
|
|
|
|
|
Server.__ComplexDictMerge2to1__(in1Dict=inRoleHierarchyAllowedDict, in2Dict=lRoleHierarchyAllowedOLDDict) # Merge dict 2 into dict 1
|
|
|
|
|
Dictionary.Merge(in1Dict=inRoleHierarchyAllowedDict, in2Dict=lRoleHierarchyAllowedOLDDict) # Merge dict 2 into dict 1
|
|
|
|
|
|
|
|
|
|
# Create Access item
|
|
|
|
|
lRuleDomainUserDict = {
|
|
|
|
@ -1281,7 +1282,7 @@ def GSettingsGet(inGSettings=None):
|
|
|
|
|
global GSettings # identify the global variable
|
|
|
|
|
# Merge dictionaries if some new dictionary has come
|
|
|
|
|
if inGSettings is not None and GSettings is not inGSettings:
|
|
|
|
|
GSettings = Server.__ComplexDictMerge2to1Overwrite__(in1Dict = inGSettings, in2Dict = GSettings)
|
|
|
|
|
GSettings = Dictionary.MergeNoException(in1Dict = inGSettings, in2Dict = GSettings)
|
|
|
|
|
return GSettings # Return the result
|
|
|
|
|
|
|
|
|
|
def GSettingsKeyListValueSet(inValue, inKeyList=None, inGSettings = None):
|
|
|
|
|