fix(user_details): fetch user details from session

!1
This commit is contained in:
2023-08-14 04:08:17 +00:00
parent d4897a946b
commit dad83f3373

View File

@ -4009,7 +4009,7 @@
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<fieldset id=\"form\" style=\"width: 400px;\">\n <legend style=\"text-align: left;\"><h2>Self-Service Password Reset</h2></legend>\n\n <form method=\"post\" action=\"/{{{ global.config.http_path }}}passwordreset\" ajax=\"true\">\n <p style=\"padding: 15px;\">To reset your password, ALL fields are Mandatory. On completing this form click 'submit' below. Results will be posted in the results window underneath the submit button.</p>\n <label for=\"fname\">First Name</label>\n <input type=\"text\" id=\"givenName\" name=\"givenName\"{{#auth.user}} value=\"{{auth.user.fname}}\" readonly{{/auth.user}}>\n\n <label for=\"lname\">Last Name</label>\n <input type=\"text\" id=\"sn\" name=\"sn\"{{#auth.user}} value=\"{{auth.user.lname}}\" readonly{{/auth.user}}>\n\n <label for=\"lname\">E-Mail Address</label>\n <input type=\"text\" id=\"mail\" name=\"mail\"{{#auth.user}} value=\"{{auth.user.mail}}\" readonly{{/auth.user}}>\n\n <label for=\"lname\">User Name</label>\n <input type=\"text\" id=\"uid\" name=\"uid\"{{#auth.user}} value=\"{{auth.user.username}}\" readonly{{/auth.user}}>\n\n <label for=\"random\">First half</label><p id=\"labelDescription\">This is the first half of your password</p>\n <input style=\"font-size: 14pt\" type=\"text\" id=\"random\" name=\"random\" value=\"{{{random}}}\" readonly>\n\n <input type=\"submit\" value=\"Submit\">\n </form>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}';\">Home</button>\n </fieldset>\n\n<fieldset id=\"response\">\n <legend style=\"text-align: left;\">Results</legend>\n <span id=\"result\"></span>\n</fieldset>\n<div >\n <span id=\"result\"></span>\n</div>\n",
"template": "<fieldset id=\"form\" style=\"width: 400px;\">\n <legend style=\"text-align: left;\"><h2>Self-Service Password Reset</h2></legend>\n\n <form method=\"post\" action=\"/{{{ global.config.http_path }}}passwordreset\" ajax=\"true\">\n <p style=\"padding: 15px;\">To reset your password, ALL fields are Mandatory. On completing this form click 'submit' below. Results will be posted in the results window underneath the submit button.</p>\n <label for=\"fname\">First Name</label>\n <input type=\"text\" id=\"givenName\" name=\"givenName\"{{#session.user}} value=\"{{session.user.fname}}\" readonly{{/session.user}}>\n\n <label for=\"lname\">Last Name</label>\n <input type=\"text\" id=\"sn\" name=\"sn\"{{#session.user}} value=\"{{session.user.lname}}\" readonly{{/session.user}}>\n\n <label for=\"lname\">E-Mail Address</label>\n <input type=\"text\" id=\"mail\" name=\"mail\"{{#session.user}} value=\"{{session.user.mail}}\" readonly{{/session.user}}>\n\n <label for=\"lname\">User Name</label>\n <input type=\"text\" id=\"uid\" name=\"uid\"{{#session.user}} value=\"{{session.user.username}}\" readonly{{/session.user}}>\n\n <label for=\"random\">First half</label><p id=\"labelDescription\">This is the first half of your password</p>\n <input style=\"font-size: 14pt\" type=\"text\" id=\"random\" name=\"random\" value=\"{{{random}}}\" readonly>\n\n <input type=\"submit\" value=\"Submit\">\n </form>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}';\">Home</button>\n </fieldset>\n\n<fieldset id=\"response\">\n <legend style=\"text-align: left;\">Results</legend>\n <span id=\"result\"></span>\n</fieldset>\n<div >\n <span id=\"result\"></span>\n</div>\n",
"x": 850,
"y": 720,
"wires": [
@ -4204,7 +4204,7 @@
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<fieldset id=\"form\" style=\"width: 400px;\">\n <legend style=\"text-align: left;\"><h2>Main Menu</h2></legend>\n\n <p style=\"text-align: left;\">G'Day {{{ auth.user.fname}}}</p>\n\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}details';\">My Details</button>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}changepassword';\">Change Password</button>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}passwordreset';\">Password Reset</button>\n{{#global.config.developer_mode}}\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}passwordquestions';\">Password Reset Questions</button>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}logout';\">Log Out</button>\n{{/global.config.developer_mode}}\n\n</fieldset>",
"template": "<fieldset id=\"form\" style=\"width: 400px;\">\n <legend style=\"text-align: left;\"><h2>Main Menu</h2></legend>\n\n <p style=\"text-align: left;\">G'Day {{{ session.user.fname}}}</p>\n\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}details';\">My Details</button>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}changepassword';\">Change Password</button>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}passwordreset';\">Password Reset</button>\n{{#global.config.developer_mode}}\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}passwordquestions';\">Password Reset Questions</button>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}logout';\">Log Out</button>\n{{/global.config.developer_mode}}\n\n</fieldset>",
"x": 450,
"y": 340,
"wires": [
@ -4400,7 +4400,7 @@
"fieldType": "msg",
"format": "html",
"syntax": "mustache",
"template": "\n <fieldset id=\"form\" style=\"width: 400px;\">\n <legend style=\"text-align: left;\"><h2>Account Details</h2></legend>\n\n <form method=\"post\" action=\"/{{{ global.config.http_path }}}updatedetails\" ajax=\"true\">\n <p style=\"padding: 15px;\"></p>\n\n <label for=\"givenName\">First Name</label>\n <input type=\"text\" id=\"givenName\" name=\"givenName\" disabled value=\"{{{ auth.user.fname }}}\">\n\n <label for=\"sn\">Last Name</label>\n <input type=\"text\" id=\"sn\" name=\"sn\" disabled value=\"{{{ auth.user.lname }}}\">\n\n <label for=\"uid\">User Name</label>\n <input type=\"text\" id=\"uid\" name=\"uid\" disabled value=\"{{{ auth.user.username }}}\">\n\n <label for=\"mail\">E-Mail</label>\n <input type=\"text\" id=\"mail\" name=\"mail\" disabled value=\"{{{ auth.user.mail }}}\">\n\n <input type=\"submit\" value=\"Updating Not Available\" disabled>\n </form>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}';\">Home</button>\n </fieldset>\n\n <fieldset id=\"response\">\n <legend style=\"text-align: left;\">Results</legend>\n <span id=\"result\"></span>\n </fieldset>\n <div >\n <span id=\"result\"></span>\n </div>\n",
"template": "\n <fieldset id=\"form\" style=\"width: 400px;\">\n <legend style=\"text-align: left;\"><h2>Account Details</h2></legend>\n\n <form method=\"post\" action=\"/{{{ global.config.http_path }}}updatedetails\" ajax=\"true\">\n <p style=\"padding: 15px;\"></p>\n\n <label for=\"givenName\">First Name</label>\n <input type=\"text\" id=\"givenName\" name=\"givenName\" disabled value=\"{{{ session.user.fname }}}\">\n\n <label for=\"sn\">Last Name</label>\n <input type=\"text\" id=\"sn\" name=\"sn\" disabled value=\"{{{ session.user.lname }}}\">\n\n <label for=\"uid\">User Name</label>\n <input type=\"text\" id=\"uid\" name=\"uid\" disabled value=\"{{{ session.user.username }}}\">\n\n <label for=\"mail\">E-Mail</label>\n <input type=\"text\" id=\"mail\" name=\"mail\" disabled value=\"{{{ session.user.mail }}}\">\n\n <input type=\"submit\" value=\"Updating Not Available\" disabled>\n </form>\n <button id=\"navigation\" onclick=\"window.location.href='{{{ global.config.http_path }}}';\">Home</button>\n </fieldset>\n\n <fieldset id=\"response\">\n <legend style=\"text-align: left;\">Results</legend>\n <span id=\"result\"></span>\n </fieldset>\n <div >\n <span id=\"result\"></span>\n </div>\n",
"x": 450,
"y": 460,
"wires": [