fix issue with allowed_users and admin/superuser

This commit is contained in:
dni ⚡ 2022-12-22 17:48:46 +01:00
parent 81df5a56e2
commit 7c96a12a3c

View File

@ -236,8 +236,8 @@ async def check_user_exists(usr: UUID4) -> User:
if (
len(settings.lnbits_allowed_users) > 0
and g().user.id not in settings.lnbits_allowed_users
and g().user.id != settings.super_user
and g().user.id not in settings.lnbits_admin_users
or g().user.id != settings.super_user
or g().user.id not in settings.lnbits_admin_users
):
raise HTTPException(
status_code=HTTPStatus.UNAUTHORIZED, detail="User not authorized."