fix disapearing admin extension

This commit is contained in:
Tiago vasconcelos
2022-02-09 10:57:24 +00:00
parent 35bb26b6fd
commit 4c18eb0b34
2 changed files with 9 additions and 9 deletions
+1 -3
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_ALLOWED_USERS,
LNBITS_ADMIN_USERS,
LNBITS_ALLOWED_USERS,
LNBITS_SITE_TITLE,
SERVICE_FEE,
)
@@ -118,8 +118,6 @@ 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]