Admin mode needed for some features
This commit is contained in:
parent
2cf5dbb22e
commit
e6647a6425
4 changed files with 15 additions and 5 deletions
4
main.py
4
main.py
|
|
@ -182,6 +182,8 @@ def search_people() -> str:
|
|||
|
||||
@app.route("/merge", methods=["GET", "POST"])
|
||||
def merge() -> str | Response:
|
||||
assert app.config["ADMIN_MODE"]
|
||||
|
||||
if flask.request.method == "POST":
|
||||
search_for = flask.request.form["q"]
|
||||
|
||||
|
|
@ -407,6 +409,8 @@ def search_everything() -> str:
|
|||
|
||||
@app.route("/person/<int:person_id>/delete", methods=["POST"])
|
||||
def delete_person(person_id: int) -> str | Response:
|
||||
assert app.config["ADMIN_MODE"]
|
||||
|
||||
item = model.Person.query.get(person_id)
|
||||
|
||||
for cp in item.conferences_association:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue