restrict approving and rejecting marseys to the fish

master
Aevann1 2022-09-09 11:15:16 +02:00
parent 47890d771d
commit b8cde6ca60
1 changed files with 4 additions and 0 deletions

View File

@ -491,6 +491,8 @@ def submit_marsey(v):
@app.post("/admin/approve/marsey/<name>")
@admin_level_required(3)
def approve_marsey(v, name):
if v.id != CARP_ID: abort(403)
marsey = g.db.query(Marsey).filter_by(name=name).one_or_none()
if not marsey: abort(404)
@ -522,6 +524,8 @@ def approve_marsey(v, name):
@app.post("/admin/reject/marsey/<name>")
@admin_level_required(3)
def reject_marsey(v, name):
if v.id != CARP_ID: abort(403)
marsey = g.db.query(Marsey).filter_by(name=name).one_or_none()
if not marsey: abort(404)