SAT9/.resources/4ecd8421e154eb8d21bc548e61936d0fbfb8027cd9219da4a6a9f62a6889b211
2025-05-01 00:04:09 -07:00

184 lines
4.6 KiB
Plaintext

{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 240,
"width": 400
}
},
"root": {
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"height": 32,
"width": 400
},
"props": {
"style": {
"background-color": "#555555",
"fontWeight": "bold",
"textAlign": "center"
},
"text": "Command Authentication"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Password Label"
},
"position": {
"height": 32,
"width": 152,
"x": 115.5,
"y": 68
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-White-12pt",
"fontSize": 18
},
"text": "Enter Username"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "PasswordField"
},
"position": {
"height": 32,
"width": 229,
"x": 85.5,
"y": 116
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"fontSize": 16
}
},
"type": "ia.input.password-field"
},
{
"meta": {
"name": "Error Label",
"visible": false
},
"position": {
"height": 32,
"width": 270,
"x": 56.5,
"y": 143
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"color": "#FF8000",
"fontSize": 16,
"textAlign": "center"
},
"text": "Login does not match"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tusername \u003d self.session.props.auth.user.userName\n\tlogin \u003d self.getSibling(\"PasswordField\").props.text\n\t\n\tif username \u003d\u003d login.lower():\n\t\tuser_valid \u003d True\n\telse:\n\t\tuser_valid \u003d False\n\t\n\trme_role \u003d self.session.custom.fc +\"-rme-c2c-all\"\n\tadmin_role \u003d \"eurme-ignition-admins\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles) or admin_role in roles:\n\t\thas_role \u003d True\n\telse:\n\t\thas_role \u003d False\n\t\n\tif user_valid and has_role:\n\t\tself.session.custom.command_auth.auth_time \u003d system.date.now()\n\t\tself.session.custom.command_auth.enabled \u003d True\n\t\tsystem.perspective.closePopup(\u0027\u0027)\n\telse:\n\t\tself.getSibling(\"Error Label\").meta.visible \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Authenticate"
},
"position": {
"height": 34,
"width": 120,
"x": 71,
"y": 191
},
"props": {
"image": {
"height": 20,
"width": 20
},
"style": {
"backgroundColor": "#555555",
"classes": "Background-Styles/Controller"
},
"text": "Authenticate"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.closePopup(\u0027\u0027)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Cancel"
},
"position": {
"height": 34,
"width": 120,
"x": 209,
"y": 191
},
"props": {
"image": {
"height": 20,
"width": 20
},
"style": {
"backgroundColor": "#555555",
"classes": "Background-Styles/Controller"
},
"text": "Cancel"
},
"type": "ia.input.button"
}
],
"custom": {
"tags_data": {
"$": [
"ds",
192,
1671029641714
],
"$columns": [
{
"data": [],
"name": "Tags",
"type": "String"
}
]
}
},
"meta": {
"name": "root"
},
"props": {
"style": {
"classes": "Background-Styles/Controller"
}
},
"type": "ia.container.coord"
}
}