def getSettingsForUser(username): if not userManager.enabled: return jsonify(SUCCESS) if current_user is None or current_user.is_anonymous() or (current_user.get_name() != username and not current_user.is_admin()): return make_response("Forbidden", 403) try: return jsonify(userManager.getAllUserSettings(username)) except users.UnknownUser: return make_response("Unknown user: %s" % username, 404)
def getSettingsForUser(username): if not userManager.enabled: return jsonify(SUCCESS) if current_user is None or current_user.is_anonymous or ( current_user.get_name() != username and not current_user.is_admin): return make_response("Forbidden", 403) try: return jsonify(userManager.getAllUserSettings(username)) except users.UnknownUser: return make_response("Unknown user: %s" % username, 404)