fix issue with allowed_users and admin/superuser
This commit is contained in:
@@ -236,8 +236,8 @@ async def check_user_exists(usr: UUID4) -> User:
|
|||||||
if (
|
if (
|
||||||
len(settings.lnbits_allowed_users) > 0
|
len(settings.lnbits_allowed_users) > 0
|
||||||
and g().user.id not in settings.lnbits_allowed_users
|
and g().user.id not in settings.lnbits_allowed_users
|
||||||
and g().user.id != settings.super_user
|
or g().user.id != settings.super_user
|
||||||
and g().user.id not in settings.lnbits_admin_users
|
or g().user.id not in settings.lnbits_admin_users
|
||||||
):
|
):
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=HTTPStatus.UNAUTHORIZED, detail="User not authorized."
|
status_code=HTTPStatus.UNAUTHORIZED, detail="User not authorized."
|
||||||
|
|||||||
Reference in New Issue
Block a user