diff --git a/management/daemon.py b/management/daemon.py index a007d6c8..eb467681 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -531,20 +531,22 @@ def privacy_status_set(): @app.route('/system/default-quota', methods=["GET"]) @authorized_personnel_only def default_quota_get(): - return get_default_quota(env) + return json_response({ + "default-quota": get_default_quota(env) + }) @app.route('/system/default-quota', methods=["POST"]) @authorized_personnel_only def default_quota_set(): - config = utils.load_settings(env) - try: - config["default-quota"] = validate_quota(request.form.get('default_quota')) - utils.write_settings(config, env) + config = utils.load_settings(env) + try: + config["default-quota"] = validate_quota(request.form.get('default_quota')) + utils.write_settings(config, env) - except ValueError as e: - return ("ERROR: %s" % str(e), 400) + except ValueError as e: + return ("ERROR: %s" % str(e), 400) - return "OK" + return "OK" # MUNIN diff --git a/management/templates/users.html b/management/templates/users.html index ba3985e0..a4cbdce6 100644 --- a/management/templates/users.html +++ b/management/templates/users.html @@ -348,4 +348,15 @@ function generate_random_password() { show_modal_error("Random Password", "
Here, try this:
" + pw + "