def refresh_ts3id(): ts3ids = current_user.ts3uid ts3group = { "romeo": app.config["ts3"]["servergroups"]["full"] } results = [] for ts3id in ts3ids: results.append(ts3manager.modpermissions(ts3id, groupid=ts3group[current_user.accountStatus[0]])) flash("Results:"+str(results), "info") return redirect("/services")
def add_tss3id(): ts3id = str(request.form["ts3id"]) ts3group = { "romeo": app.config["ts3"]["servergroups"]["full"] } ldaptools.modts3id(current_user.get_id() , MOD_ADD, ts3id) result = ts3manager.modpermissions(ts3id, groupid=ts3group[current_user.accountStatus[0]]) if result: flash("TS3 ID added and auth requested.", "success") else: flash("Something blew up.", "error") return redirect("/services")
def delete_ts3id(id): id = str(id) ts3manager.modpermissions(id, remove=True, groupid=app.config["ts3"]["servergroups"]["full"]) ts3manager.modpermissions(id, remove=True, groupid=app.config["ts3"]["servergroups"]["ally"]) ldaptools.modts3id(current_user.get_id() , MOD_DELETE, id) return redirect("/services")