Revert "fix disapearing admin extension"

This commit is contained in:
Arc
2022-02-10 09:56:02 +00:00
committed by GitHub
parent 1626cd2b4b
commit da6a2e772b
2 changed files with 9 additions and 9 deletions
+3 -1
View File
@@ -15,8 +15,8 @@ from lnbits.core.models import User
from lnbits.decorators import check_user_exists
from lnbits.helpers import template_renderer, url_for
from lnbits.settings import (
LNBITS_ADMIN_USERS,
LNBITS_ALLOWED_USERS,
LNBITS_ADMIN_USERS,
LNBITS_SITE_TITLE,
SERVICE_FEE,
)
@@ -118,6 +118,8 @@ async def wallet(
return template_renderer().TemplateResponse(
"error.html", {"request": request, "err": "User not authorized."}
)
if LNBITS_ADMIN_USERS and user_id in LNBITS_ADMIN_USERS:
user.admin = True
if not wallet_id:
if user.wallets and not wallet_name:
wallet = user.wallets[0]