reformatted req method

This commit is contained in:
gashapwn 2020-11-28 01:46:10 +00:00
parent e8a9e53c35
commit 8fafc34bcb

41
app.py
View File

@ -31,6 +31,12 @@ CONF_PATH = str(WORKING_DIR) + "lyadmin.conf.json"
MAX_PUB_KEY_LEN = 5000 MAX_PUB_KEY_LEN = 5000
# SHELL_ENUM = map(
# lambda k : (k, conf_obj["shell"][k]),
# list(conf_obj["shell"].keys())
# )
# Account requests are given ID numbers # Account requests are given ID numbers
# the first request will have the below # the first request will have the below
# id number # id number
@ -84,11 +90,36 @@ def req():
# Configuration for our request form # Configuration for our request form
rt = { rt = {
"username": Widg("username", "input", None), "username": Widg(
"email for account lockout / registration confirmation (optional)": Widg("email", "input", None), "username",
"SSH public key": Widg("pub_key", "textarea", None), "input",
"shell of choice": Widg("shell", "choice", map(lambda k : (k, conf_obj["shell"][k]), list(conf_obj["shell"].keys()))), None
"have you read the rules?": Widg("rule_read", "check", None) ),
"email for account lockout / registration confirmation (optional)": Widg(
"email",
"input",
None
),
"SSH public key": Widg(
"pub_key",
"textarea",
None
),
"shell of choice": Widg(
"shell",
"choice",
map(
lambda k : (k, conf_obj["shell"][k]),
list(conf_obj["shell"].keys())
)
),
"have you read the rules?": Widg(
"rule_read", "check", None
)
}; };
return render_template("req.html", req_tab = rt, widg_fun = widg_fun, page_name="req") return render_template("req.html", req_tab = rt, widg_fun = widg_fun, page_name="req")