mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 22:58:46 +01:00
reverted other try
This commit is contained in:
parent
10a065a7ca
commit
3129692ab1
2 changed files with 6 additions and 15 deletions
|
@ -133,19 +133,12 @@ async def wallet(
|
||||||
return template_renderer().TemplateResponse(
|
return template_renderer().TemplateResponse(
|
||||||
"error.html", {"request": request, "err": "User does not exist."}
|
"error.html", {"request": request, "err": "User does not exist."}
|
||||||
)
|
)
|
||||||
try:
|
if LNBITS_ALLOWED_USERS and user_id not in LNBITS_ALLOWED_USERS:
|
||||||
if LNBITS_ALLOWED_USERS and user_id not in LNBITS_ALLOWED_USERS:
|
return template_renderer().TemplateResponse(
|
||||||
return template_renderer().TemplateResponse(
|
"error.html", {"request": request, "err": "User not authorized."}
|
||||||
"error.html", {"request": request, "err": "User not authorized."}
|
)
|
||||||
)
|
if LNBITS_ADMIN_USERS and user_id in LNBITS_ADMIN_USERS:
|
||||||
except:
|
user.admin = True
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
if LNBITS_ADMIN_USERS and user_id in LNBITS_ADMIN_USERS:
|
|
||||||
user.admin = True
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
if not wallet_id:
|
if not wallet_id:
|
||||||
if user.wallets and not wallet_name: # type: ignore
|
if user.wallets and not wallet_name: # type: ignore
|
||||||
wallet = user.wallets[0] # type: ignore
|
wallet = user.wallets[0] # type: ignore
|
||||||
|
|
|
@ -245,6 +245,4 @@ async def check_user_exists(usr: UUID4) -> User:
|
||||||
)
|
)
|
||||||
if LNBITS_ADMIN_USERS and g().user.id in LNBITS_ADMIN_USERS:
|
if LNBITS_ADMIN_USERS and g().user.id in LNBITS_ADMIN_USERS:
|
||||||
g().user.admin = True
|
g().user.admin = True
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return g().user
|
return g().user
|
||||||
|
|
Loading…
Add table
Reference in a new issue