# Minor fixes

dev-linux
Ivan Maslov 4 years ago
parent b3ff62e771
commit 2e62fe58e0

@ -1,28 +1,32 @@
# Init Section
gUserNameStr = "ND" # User name
gDomainNameStr = "" # DOMAIN or EMPTY str
gDomainIsDefaultBool = True # If domain is exist and is default (default = you can type login without domain name)
def SettingsUpdate(inDict): def SettingsUpdate(inDict):
################################################## lRuleDomainUserDict = {
#""/"ND" MethodMatchURLList "MethodMatchURLBeforeList": [
l__ND_RuleMethodMatchURLBeforeList={ {
("","ND"): { "Method":"GET",
"MethodMatchURLBeforeList": [ "MatchType":"Beginwith",
{ "URL":"/",
"Method":"GET", #"FlagAccessDefRequestGlobalAuthenticate": TestDef
"MatchType":"Beginwith", "FlagAccess": True
"URL":"/", },
#"FlagAccessDefRequestGlobalAuthenticate": TestDef {
"FlagAccess": True "Method":"POST",
}, "MatchType":"Beginwith",
{ "URL":"/",
"Method":"POST", #"FlagAccessDefRequestGlobalAuthenticate": TestDef
"MatchType":"Beginwith", "FlagAccess": True
"URL":"/", }
#"FlagAccessDefRequestGlobalAuthenticate": TestDef ],
"FlagAccess": True "ControlPanelKeyAllowedList": ["TestControlPanel", "RobotRDPActive","RobotScreenActive", "ControlPanel_Template"] # If empty - all is allowed
}
],
"ControlPanelKeyAllowedList": ["TestControlPanel", "RobotRDPActive","RobotScreenActive", "ControlPanel_Template"] # If empty - all is allowed
}
} }
#Append to global list # Case add domain + user
inDict["Server"]["AccessUsers"]["RuleDomainUserDict"].update(l__ND_RuleMethodMatchURLBeforeList) inDict["Server"]["AccessUsers"]["RuleDomainUserDict"].update({(gDomainNameStr.upper(),gUserNameStr.upper()):lRuleDomainUserDict})
if gDomainIsDefaultBool:
# Case add default domain + user
inDict["Server"]["AccessUsers"]["RuleDomainUserDict"].update({("",gUserNameStr.upper()):lRuleDomainUserDict})
#Return current dict #Return current dict
return inDict return inDict

@ -84,10 +84,11 @@ def ControlPanelRenderDict(inGSettings):
"DataStorageKey":gControlPanelKeyStr, # CLIENT SIDE:: Use key for set current dict in mGlobal.DataStorage["DataStorageKey"] on client side "DataStorageKey":gControlPanelKeyStr, # CLIENT SIDE:: Use key for set current dict in mGlobal.DataStorage["DataStorageKey"] on client side
"SubheaderText":"<Subheader text, state filled below>", "SubheaderText":"<Subheader text, state filled below>",
"BodyKeyValueList":[ "BodyKeyValueList":[
{"Key":"Info","Value":"1"}, {"Key":"Scheduler","Value":""},
{"Key":"Info","Value":"2"}, {"Key":"Start","Value":f"at {gActivityROBOTStartTimeHH_MMStr} in weekdays {gActivityROBOTStartWeekdayList}"},
{"Key":"Info","Value":"3"}, {"Key":"Stop (kill)","Value":f"at {gActivityROBOTStopTimeHH_MMStr} in weekdays {gActivityROBOTStopWeekdayList}"},
{"Key":"Statistic","Value":""} {"Key":"Statistic","Value":""},
{"Key":"...","Value":""}
], ],
"FooterText":"Last update: 9:38:00 09.10.2019", "FooterText":"Last update: 9:38:00 09.10.2019",
"FooterButtonX2List":[ "FooterButtonX2List":[

@ -0,0 +1,32 @@
# Init Section
gUserNameStr = "Login" # User name without domain name
gDomainNameStr = "" # DOMAIN or EMPTY str if no domain
gDomainIsDefaultBool = True # If domain is exist and is default (default = you can type login without domain name)
def SettingsUpdate(inDict):
lRuleDomainUserDict = {
"MethodMatchURLBeforeList": [
{
"Method":"GET",
"MatchType":"Beginwith",
"URL":"/",
#"FlagAccessDefRequestGlobalAuthenticate": TestDef
"FlagAccess": True
},
{
"Method":"POST",
"MatchType":"Beginwith",
"URL":"/",
#"FlagAccessDefRequestGlobalAuthenticate": TestDef
"FlagAccess": True
}
],
"ControlPanelKeyAllowedList": ["TestControlPanel", "RobotRDPActive","RobotScreenActive", "ControlPanel_Template"] # If empty - all is allowed
}
# Case add domain + user
inDict["Server"]["AccessUsers"]["RuleDomainUserDict"].update({(gDomainNameStr.upper(),gUserNameStr.upper()):lRuleDomainUserDict})
if gDomainIsDefaultBool:
# Case add default domain + user
inDict["Server"]["AccessUsers"]["RuleDomainUserDict"].update({("",gUserNameStr.upper()):lRuleDomainUserDict})
#Return current dict
return inDict
Loading…
Cancel
Save