Reverted try
This commit is contained in:
parent
1aa2f01d29
commit
10a065a7ca
|
@ -239,16 +239,12 @@ async def check_user_exists(usr: UUID4) -> User:
|
||||||
if LNBITS_ADMIN_UI:
|
if LNBITS_ADMIN_UI:
|
||||||
LNBITS_ADMIN_USERS = g().admin_conf.admin_users
|
LNBITS_ADMIN_USERS = g().admin_conf.admin_users
|
||||||
LNBITS_ALLOWED_USERS = g().admin_conf.allowed_users
|
LNBITS_ALLOWED_USERS = g().admin_conf.allowed_users
|
||||||
try:
|
if LNBITS_ALLOWED_USERS and g().user.id not in LNBITS_ALLOWED_USERS:
|
||||||
if LNBITS_ALLOWED_USERS and g().user.id not in LNBITS_ALLOWED_USERS:
|
raise HTTPException(
|
||||||
raise HTTPException(
|
status_code=HTTPStatus.UNAUTHORIZED, detail="User not authorized."
|
||||||
status_code=HTTPStatus.UNAUTHORIZED, detail="User not authorized."
|
)
|
||||||
)
|
if LNBITS_ADMIN_USERS and g().user.id in LNBITS_ADMIN_USERS:
|
||||||
except:
|
g().user.admin = True
|
||||||
pass
|
|
||||||
try:
|
|
||||||
if LNBITS_ADMIN_USERS and g().user.id in LNBITS_ADMIN_USERS:
|
|
||||||
g().user.admin = True
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return g().user
|
return g().user
|
||||||
|
|
Loading…
Reference in New Issue
Block a user