fix issue with allowed_users and admin/superuser
This commit is contained in:
parent
81df5a56e2
commit
7c96a12a3c
1 changed files with 2 additions and 2 deletions
|
|
@ -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."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue