add superuser and refactor check_admin function, also put it into satspay

This commit is contained in:
dni ⚡
2022-12-05 20:41:23 +01:00
parent 9d67c8e4e5
commit c56a31e6f5
10 changed files with 42 additions and 57 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ async def wallet(
return template_renderer().TemplateResponse(
"error.html", {"request": request, "err": "User not authorized."}
)
if user_id in settings.lnbits_admin_users:
if user_id == settings.super_user or user_id in settings.lnbits_admin_users:
user.admin = True
if not wallet_id:
if user.wallets and not wallet_name: # type: ignore