router_info: Remove redundant user evaluation

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2017-12-12 12:41:08 +01:00
parent ab400e1f01
commit 4389f4f11a
1 changed files with 1 additions and 5 deletions

View File

@ -141,12 +141,8 @@ def router_info(dbid):
if request.method == 'POST':
if request.form.get("act") == "delete":
user = None
# a router may not have a owner, but admin users still can delete it
if ("user" in router):
user = router["user"]
if is_authorized(user, session):
#if True:
if is_authorized(router["user"], session):
delete_router(mysql,dbid)
flash("<b>Router <i>%s</i> deleted!</b>" % router["hostname"], "success")
mysql.close()