git.haldean.org apex / 2d67e2c
only admins can add new users Haldean Brown 3 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4949 def adduser():
5050 if users.session_user() is None:
5151 return flask.redirect(flask.url_for("index"))
52 if not users.user_is_admin():
53 return flask.redirect(flask.url_for("index"))
5254 if flask.request.method == "GET":
5355 return flask.render_template("adduser.html", username=users.session_user())
5456 username = flask.request.form["username"]